@realsee/five 6.8.0-alpha.3 → 6.8.0-alpha.30

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 (762) hide show
  1. package/AGENTS_READ_ME.md +6 -1
  2. package/AI_CONTEXT.md +6 -1
  3. package/README.md +10 -6
  4. package/ai_guides/README.md +40 -2
  5. package/ai_guides/ai-doc-guidelines.md +31 -1
  6. package/ai_guides/api.md +107 -13
  7. package/ai_guides/features/3dtile.md +49 -141
  8. package/ai_guides/features/camera-animation.md +42 -4
  9. package/ai_guides/features/clipper.md +4 -2
  10. package/ai_guides/features/{coordnate-system.md → coordinate-system.md} +22 -2
  11. package/ai_guides/features/event.md +108 -10
  12. package/ai_guides/features/five.md +20 -16
  13. package/ai_guides/features/flowing-light-2d-pass.md +442 -0
  14. package/ai_guides/features/flowing-light-3d-pass.md +425 -0
  15. package/ai_guides/features/gaussian-blur-pass.md +202 -0
  16. package/ai_guides/features/gesture.md +4 -1
  17. package/ai_guides/features/get-screen-pixels.md +4 -2
  18. package/ai_guides/features/image-options.md +5 -2
  19. package/ai_guides/features/load-external-model.md +27 -2
  20. package/ai_guides/features/load-progress.md +140 -0
  21. package/ai_guides/features/material.md +159 -0
  22. package/ai_guides/features/mode.md +5 -1
  23. package/ai_guides/features/model.md +5 -2
  24. package/ai_guides/features/move-pano-effect.md +3 -1
  25. package/ai_guides/features/multi-work.md +3 -1
  26. package/ai_guides/features/pano-filter.md +149 -0
  27. package/ai_guides/features/pano-tile.md +8 -15
  28. package/ai_guides/features/pano-uv.md +131 -0
  29. package/ai_guides/features/parameter.md +117 -118
  30. package/ai_guides/features/plugin.md +210 -0
  31. package/ai_guides/features/postprocessing.md +40 -5
  32. package/ai_guides/features/raycast.md +16 -2
  33. package/ai_guides/features/request-proxy.md +3 -1
  34. package/ai_guides/features/screen-project.md +4 -1
  35. package/ai_guides/features/state.md +25 -3
  36. package/ai_guides/features/view-layer.md +187 -0
  37. package/ai_guides/features/work.md +64 -3
  38. package/ai_guides/glossary.md +28 -7
  39. package/ai_guides/intro.md +1 -1
  40. package/ai_guides/quick-start.md +1 -0
  41. package/ai_guides/release_notes/6.8.md +222 -0
  42. package/ai_guides/template.md +28 -3
  43. package/docs/00_FOR_AI_AGENTS.md +3 -2
  44. package/docs/README.md +3 -2
  45. package/docs/assets/hierarchy.js +1 -1
  46. package/docs/assets/main.js +1 -1
  47. package/docs/assets/navigation.js +1 -1
  48. package/docs/assets/search.js +1 -1
  49. package/docs/classes/five.AdaptiveLuminancePass.html +7 -6
  50. package/docs/classes/five.AnimationFrameLoop.html +1 -1
  51. package/docs/classes/five.BoundingMesh.html +2 -2
  52. package/docs/classes/five.Camera.html +3 -3
  53. package/docs/classes/five.EyeDomeLightingPass.html +1 -1
  54. package/docs/classes/five.Five.html +77 -76
  55. package/docs/classes/five.FivePass.html +1 -1
  56. package/docs/classes/five.Histogram.html +19 -0
  57. package/docs/classes/five.InternalWebGLRenderer.html +1 -1
  58. package/docs/classes/five.Model.html +32 -32
  59. package/docs/classes/five.ModelScene.html +1 -1
  60. package/docs/classes/five.NetworkSubscribe.html +5 -5
  61. package/docs/classes/five.PBMContainer.html +1 -1
  62. package/docs/classes/five.PBMCustomShader.html +42 -3
  63. package/docs/classes/five.PBMGSObject.html +5 -3
  64. package/docs/classes/five.PBMGroup.html +1 -1
  65. package/docs/classes/five.PBMMesh.html +1 -1
  66. package/docs/classes/five.PBMMeshMaterial.html +16 -7
  67. package/docs/classes/five.PBMPanoFilter.html +61 -0
  68. package/docs/classes/five.PBMPointCloud.html +1 -1
  69. package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
  70. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  71. package/docs/classes/five.PBMUpdateable.html +41 -0
  72. package/docs/classes/five.PanoCircleMesh.html +1 -1
  73. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  74. package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
  75. package/docs/classes/five.Parameter.html +59 -55
  76. package/docs/classes/five.Scene.html +1 -1
  77. package/docs/classes/five.Subscribe.html +5 -5
  78. package/docs/classes/five.Tile.html +1 -1
  79. package/docs/classes/five.Tile3D.html +30 -26
  80. package/docs/classes/five.TileNode.html +1 -1
  81. package/docs/classes/five.Tileset.html +3 -2
  82. package/docs/classes/five.Trajectory.html +1 -1
  83. package/docs/classes/five.TrajectoryNode.html +1 -1
  84. package/docs/classes/five.Work.html +16 -16
  85. package/docs/classes/five.WorkResolvedObserver.html +41 -16
  86. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  87. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  88. package/docs/classes/gltf-loader.GLTFLoader.html +2 -2
  89. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  90. package/docs/classes/gltf-loader.GLTFParser.html +1 -1
  91. package/docs/classes/gltf-loader.THREEGLTFLoader.html +2 -2
  92. package/docs/classes/line.Line.html +1 -1
  93. package/docs/classes/line.LineGeometry.html +1 -1
  94. package/docs/classes/line.LineMaterial.html +1 -1
  95. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  96. package/docs/classes/line.THREE_Line2.html +1 -1
  97. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  98. package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
  99. package/docs/classes/plugins.CSS3DObject.html +7 -0
  100. package/docs/classes/plugins.CSS3DSprite.html +7 -0
  101. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  102. package/docs/classes/sticker.Sticker.html +1 -1
  103. package/docs/classes/vfx.Airflow.html +1 -1
  104. package/docs/classes/vfx.Flame.html +1 -1
  105. package/docs/classes/vfx.Particle.html +6 -6
  106. package/docs/classes/vfx.ParticleGPU.html +3 -3
  107. package/docs/classes/vfx.SpotLight.html +1 -1
  108. package/docs/documents/README.html +132 -3
  109. package/docs/documents/ai-doc-guidelines.html +48 -3
  110. package/docs/documents/api.html +179 -26
  111. package/docs/documents/features_3dtile.html +143 -46
  112. package/docs/documents/features_camera-animation.html +79 -6
  113. package/docs/documents/features_clipper.html +5 -2
  114. package/docs/documents/{features_coordnate-system.html → features_coordinate-system.html} +56 -4
  115. package/docs/documents/features_event.html +47 -8
  116. package/docs/documents/features_five.html +20 -16
  117. package/docs/documents/features_flowing-light-2d-pass.html +259 -0
  118. package/docs/documents/features_flowing-light-3d-pass.html +249 -0
  119. package/docs/documents/features_gaussian-blur-pass.html +182 -0
  120. package/docs/documents/features_gesture.html +5 -1
  121. package/docs/documents/features_get-screen-pixels.html +5 -2
  122. package/docs/documents/features_image-options.html +5 -2
  123. package/docs/documents/features_load-external-model.html +31 -4
  124. package/docs/documents/features_load-progress.html +110 -0
  125. package/docs/documents/features_material.html +341 -0
  126. package/docs/documents/features_mode.html +6 -1
  127. package/docs/documents/features_model.html +6 -2
  128. package/docs/documents/features_move-pano-effect.html +4 -1
  129. package/docs/documents/features_multi-work.html +4 -1
  130. package/docs/documents/features_pano-filter.html +123 -0
  131. package/docs/documents/features_pano-tile.html +35 -20
  132. package/docs/documents/features_pano-uv.html +82 -0
  133. package/docs/documents/features_parameter.html +84 -56
  134. package/docs/documents/features_plugin.html +105 -0
  135. package/docs/documents/features_postprocessing.html +23 -6
  136. package/docs/documents/features_raycast.html +9 -3
  137. package/docs/documents/features_request-proxy.html +4 -1
  138. package/docs/documents/features_screen-project.html +5 -1
  139. package/docs/documents/features_state.html +12 -2
  140. package/docs/documents/features_view-layer.html +158 -0
  141. package/docs/documents/features_work.html +64 -3
  142. package/docs/documents/glossary.html +33 -8
  143. package/docs/documents/intro.html +1 -1
  144. package/docs/documents/quick-start.html +1 -0
  145. package/docs/documents/release_notes_6.8.html +203 -0
  146. package/docs/documents/template.html +54 -4
  147. package/docs/functions/five.createDebugBoundingMesh.html +1 -1
  148. package/docs/functions/five.loadAt3d.html +1 -1
  149. package/docs/functions/five.loadB3dm.html +1 -1
  150. package/docs/functions/five.loadDome.html +1 -1
  151. package/docs/functions/five.loadDomez.html +1 -1
  152. package/docs/functions/five.loadFbx.html +1 -1
  153. package/docs/functions/five.loadGltf.html +1 -1
  154. package/docs/functions/five.loadPbm.html +1 -1
  155. package/docs/functions/five.loadPly.html +1 -1
  156. package/docs/functions/five.loadPnts.html +1 -1
  157. package/docs/functions/five.loadSplat.html +1 -1
  158. package/docs/functions/five.loadSpz.html +1 -1
  159. package/docs/functions/five.loadX3p.html +1 -1
  160. package/docs/functions/five.parseWork.html +1 -1
  161. package/docs/functions/plugins.CSS3DPlugin.html +1 -0
  162. package/docs/functions/plugins.GaussianSplattingEntranceAnimationPlugin.html +1 -0
  163. package/docs/functions/react.useFiveCurrentObserver.html +2 -2
  164. package/docs/functions/react.useFiveFloor.html +2 -2
  165. package/docs/functions/react.useFiveProject2d.html +2 -2
  166. package/docs/functions/vue.useFiveCurrentObserver.html +2 -2
  167. package/docs/functions/vue.useFiveFloor.html +2 -2
  168. package/docs/functions/vue.useFiveWorks.html +2 -2
  169. package/docs/hierarchy.html +1 -1
  170. package/docs/index.html +132 -3
  171. package/docs/interfaces/five.AddableObject.html +1 -1
  172. package/docs/interfaces/five.AjaxOptions.html +1 -1
  173. package/docs/interfaces/five.BaseEvent.html +7 -2
  174. package/docs/interfaces/five.BaseExtendableEvent.html +11 -0
  175. package/docs/interfaces/five.EventCallback.html +60 -52
  176. package/docs/interfaces/five.FiveInitArgs.html +2 -2
  177. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
  178. package/docs/interfaces/five.GestureEvent.html +21 -2
  179. package/docs/interfaces/five.GesturePointer.html +20 -0
  180. package/docs/interfaces/five.ImageOptions.html +1 -1
  181. package/docs/interfaces/five.IntersectEvent.html +10 -2
  182. package/docs/interfaces/five.IntersectMesh.html +1 -1
  183. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  184. package/docs/interfaces/five.Intersection.html +4 -3
  185. package/docs/interfaces/five.LooseWorkObserver.html +2 -2
  186. package/docs/interfaces/five.LooseWorkPanorama.html +2 -2
  187. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
  188. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +10 -10
  189. package/docs/interfaces/five.ModeChangeEvent.html +9 -2
  190. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  191. package/docs/interfaces/five.ModelEvent.html +7 -2
  192. package/docs/interfaces/five.ModelSceneEvent.html +7 -2
  193. package/docs/interfaces/five.ModelTileEvent.html +13 -0
  194. package/docs/interfaces/five.MovePanoOptions.html +8 -8
  195. package/docs/interfaces/five.NetworkAbortError.html +1 -1
  196. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
  197. package/docs/interfaces/five.NetworkOptions.html +1 -1
  198. package/docs/interfaces/five.NetworkProxyError.html +1 -1
  199. package/docs/interfaces/five.NetworkResourceEvent.html +7 -2
  200. package/docs/interfaces/five.NetworkResponseError.html +1 -1
  201. package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
  202. package/docs/interfaces/five.ObjectEvent.html +7 -2
  203. package/docs/interfaces/five.PBMClipperParameter.html +2 -2
  204. package/docs/interfaces/five.PBMCustomShaderInitArgs.html +2 -2
  205. package/docs/interfaces/five.PBMCustomShaderSlots.html +2 -2
  206. package/docs/interfaces/five.PBMMaterial.html +1 -1
  207. package/docs/interfaces/five.PBMMeshMaterialParameters.html +5 -3
  208. package/docs/interfaces/five.PBMPanoDepth.html +5 -5
  209. package/docs/interfaces/five.PBMPanoFilterValue.html +6 -0
  210. package/docs/interfaces/five.PBMPanoPicture.html +8 -6
  211. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
  212. package/docs/interfaces/five.PBMRefinedScreen.html +2 -2
  213. package/docs/interfaces/five.PanoCircleMeshInterface.html +2 -2
  214. package/docs/interfaces/five.PanoEvent.html +15 -2
  215. package/docs/interfaces/five.PanoPrepareEvent.html +15 -0
  216. package/docs/interfaces/five.PanoTextureEvent.html +11 -2
  217. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  218. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  219. package/docs/interfaces/five.ParameterMaterialValue.html +42 -38
  220. package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
  221. package/docs/interfaces/five.ParameterValue.html +56 -52
  222. package/docs/interfaces/five.Pose.html +1 -1
  223. package/docs/interfaces/five.RenderEvent.html +7 -2
  224. package/docs/interfaces/five.ResolvedParameterValue.html +57 -54
  225. package/docs/interfaces/five.RgbaData.html +7 -0
  226. package/docs/interfaces/five.SplatData.html +2 -2
  227. package/docs/interfaces/five.State.html +1 -1
  228. package/docs/interfaces/five.StateEvent.html +9 -2
  229. package/docs/interfaces/five.TextureOptions.html +1 -1
  230. package/docs/interfaces/five.Tile3DOptions.html +2 -2
  231. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
  232. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  233. package/docs/interfaces/five.ViewLayer.html +30 -26
  234. package/docs/interfaces/five.WorkCubeImage.html +3 -2
  235. package/docs/interfaces/five.WorkImage.html +6 -5
  236. package/docs/interfaces/five.WorkInitial.html +8 -8
  237. package/docs/interfaces/five.WorkModel.html +8 -8
  238. package/docs/interfaces/five.WorkModelLayer.html +6 -6
  239. package/docs/interfaces/five.WorkObserver.html +42 -17
  240. package/docs/interfaces/five.WorkObserverJson.html +2 -2
  241. package/docs/interfaces/five.WorkObserverProto.html +26 -0
  242. package/docs/interfaces/five.WorkPanoramaJson.html +2 -2
  243. package/docs/interfaces/five.WorkTile.html +6 -5
  244. package/docs/interfaces/five.WorkVideo.html +4 -4
  245. package/docs/interfaces/five.WorksEvent.html +7 -2
  246. package/docs/interfaces/five.XRControllerEvent.html +10 -2
  247. package/docs/interfaces/five.XRControllerState.html +8 -0
  248. package/docs/interfaces/five.XRGestureEvent.html +13 -2
  249. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  250. package/docs/interfaces/five.XRSessionEvent.html +9 -2
  251. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  252. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  253. package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
  254. package/docs/interfaces/plugins.CSS3DPluginController.html +50 -0
  255. package/docs/interfaces/plugins.CSS3DPluginType.Config.html +2 -0
  256. package/docs/interfaces/plugins.CSS3DPluginType.CreateCSS3DObjectType.html +10 -0
  257. package/docs/interfaces/plugins.CSS3DPluginType.EventMap.html +10 -0
  258. package/docs/interfaces/plugins.CSS3DPluginType.Params.html +4 -0
  259. package/docs/interfaces/plugins.CSS3DPluginType.State.html +8 -0
  260. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +3 -3
  261. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
  262. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
  263. package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationController.html +44 -0
  264. package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.BoundingAABB2D.html +3 -0
  265. package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.Config.html +8 -0
  266. package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.EventMap.html +10 -0
  267. package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.Keyframe.html +3 -0
  268. package/docs/interfaces/plugins.GaussianSplattingEntranceAnimationPluginType.State.html +8 -0
  269. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  270. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  271. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +2 -2
  272. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  273. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  274. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  275. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  276. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  277. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  278. package/docs/interfaces/plugins.PlayingState.html +2 -2
  279. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  280. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  281. package/docs/interfaces/plugins.TrajectoryController.html +8 -8
  282. package/docs/interfaces/react.FiveInjectionTypes.html +21 -21
  283. package/docs/interfaces/sticker.IntersectionLike.html +2 -2
  284. package/docs/interfaces/vfx.ParticleArgs.html +4 -4
  285. package/docs/interfaces/vue.FiveActionVueCallbacks.html +3 -3
  286. package/docs/modules/five.html +1 -1
  287. package/docs/modules/plugins.CSS3DPluginType.html +1 -0
  288. package/docs/modules/plugins.GaussianSplattingEntranceAnimationPluginType.html +1 -0
  289. package/docs/modules/plugins.html +1 -1
  290. package/docs/modules.html +1 -1
  291. package/docs/types/five.ControllerEventTypes.html +30 -26
  292. package/docs/types/five.EasingFunction.html +1 -0
  293. package/docs/types/five.EventTypes.html +27 -25
  294. package/docs/types/five.LegacyEventType.html +7 -7
  295. package/docs/types/five.NetworkProgressCallback.html +1 -1
  296. package/docs/types/five.PBMAlphaMode.html +1 -1
  297. package/docs/types/five.PBMColorStyle.html +1 -1
  298. package/docs/types/five.PBMFloorStyle.html +1 -1
  299. package/docs/types/five.PBMMeshShaderType.html +1 -1
  300. package/docs/types/five.PBMPointBack.html +1 -1
  301. package/docs/types/five.PBMPointCloudShaderType.html +1 -1
  302. package/docs/types/five.PBMPointShape.html +1 -1
  303. package/docs/types/five.PBMPointSize.html +1 -1
  304. package/docs/types/five.PBMTransition.html +1 -1
  305. package/docs/types/five.ParseOptions.html +6 -6
  306. package/docs/types/five.Works.html +1 -1
  307. package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
  308. package/docs/types/plugins.CSS3DPluginType.PluginData.html +1 -0
  309. package/docs/types/plugins.CSS3DPluginType.ServerData.html +1 -0
  310. package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
  311. package/five/application/analysis.d.ts +40 -0
  312. package/five/application/controllers.d.ts +41 -0
  313. package/five/application/events-legacy.d.ts +454 -0
  314. package/five/application/events.d.ts +69 -0
  315. package/five/application/five.d.ts +519 -0
  316. package/five/application/fiveInitArgs.d.ts +176 -0
  317. package/five/application/fiveLoadOptions.d.ts +21 -0
  318. package/five/application/generateDefaultVideoElement.d.ts +2 -0
  319. package/five/application/getViewportScale.d.ts +2 -0
  320. package/five/application/initLights.d.ts +3 -0
  321. package/five/application/mode.d.ts +28 -0
  322. package/five/application/renderPoweredByRealsee.d.ts +3 -0
  323. package/five/assets/cardboard-png-data-url.d.ts +2 -0
  324. package/five/assets/gradient-png-data-url.d.ts +2 -0
  325. package/five/assets/loading-png-data-url.d.ts +2 -0
  326. package/five/assets/phone-png-data-url.d.ts +2 -0
  327. package/five/assets/realsee-png-data-url.d.ts +2 -0
  328. package/five/bvh/bvhMath.d.ts +33 -0
  329. package/five/bvh/bvhMesh.d.ts +7 -0
  330. package/five/bvh/bvhNode.d.ts +29 -0
  331. package/five/bvh/bvhObject.d.ts +18 -0
  332. package/five/bvh/bvhPoints.d.ts +6 -0
  333. package/five/bvh/index.d.ts +10 -0
  334. package/five/bvh/worker.d.ts +35 -0
  335. package/five/cardboard/helper.d.ts +2 -0
  336. package/five/cardboard/index.d.ts +13 -0
  337. package/five/cardboard/sensor.d.ts +158 -0
  338. package/five/certificates/hardware.d.ts +1 -0
  339. package/five/controllers/base.d.ts +167 -0
  340. package/five/controllers/events.d.ts +73 -0
  341. package/five/controllers/floorplan.d.ts +119 -0
  342. package/five/controllers/mapview.d.ts +139 -0
  343. package/five/controllers/model.d.ts +57 -0
  344. package/five/controllers/panorama.d.ts +144 -0
  345. package/five/controllers/panoramaLike.d.ts +87 -0
  346. package/five/controllers/topview.d.ts +42 -0
  347. package/five/controllers/vrPanorama.d.ts +56 -0
  348. package/five/controllers/xrPanorama.d.ts +81 -0
  349. package/five/core/camera.d.ts +65 -0
  350. package/five/core/internalWebGLRenderer.d.ts +14 -0
  351. package/five/core/panoVideo.d.ts +18 -0
  352. package/five/core/scene.d.ts +10 -0
  353. package/five/core/tiling.d.ts +43 -0
  354. package/five/declare.d.ts +2 -1
  355. package/five/gaussian-splatting/util/renderData.d.ts +66 -0
  356. package/five/gaussian-splatting/wasm/data.d.ts +20 -0
  357. package/five/gaussian-splatting/wasm/sort.d.ts +18 -0
  358. package/five/gaussian-splatting/worker/dataWorker.d.ts +1 -0
  359. package/five/gaussian-splatting/worker/sortWorker.d.ts +1 -0
  360. package/five/index.d.ts +60 -4636
  361. package/five/index.js +272 -392
  362. package/five/index.mjs +26890 -31013
  363. package/five/meshes/boundingMesh.d.ts +13 -0
  364. package/five/meshes/intersectMesh.d.ts +8 -0
  365. package/five/meshes/panoCircleMesh.d.ts +35 -0
  366. package/five/meshes/panoCircleMeshCustom.d.ts +40 -0
  367. package/five/meshes/panoCircleMeshSolid.d.ts +34 -0
  368. package/five/meshes/panoSphereMesh.d.ts +27 -0
  369. package/five/model/helpers/coordinate-transform.d.ts +3 -0
  370. package/five/model/helpers/ellipsoid-coordinates.d.ts +14 -0
  371. package/five/model/helpers/get-edges-by-sphere.d.ts +8 -0
  372. package/five/model/helpers/get-recommend-tile3d-parameters.d.ts +8 -0
  373. package/five/model/index.d.ts +70 -0
  374. package/five/model/intersection.d.ts +18 -0
  375. package/five/model/loaders/at3d.d.ts +12 -0
  376. package/five/model/loaders/b3dm.d.ts +9 -0
  377. package/five/model/loaders/dome.d.ts +22 -0
  378. package/five/model/loaders/domez.d.ts +11 -0
  379. package/five/model/loaders/fbx.d.ts +8 -0
  380. package/five/model/loaders/glTF-helpers/extensions/CESIUM_RTC.d.ts +9 -0
  381. package/five/model/loaders/glTF-helpers/extensions/EXT_meshopt_compression.d.ts +8 -0
  382. package/five/model/loaders/glTF-helpers/extensions/EXT_texture_webp.d.ts +11 -0
  383. package/five/model/loaders/glTF-helpers/extensions/KHR_animation_pointer.d.ts +6 -0
  384. package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +25 -0
  385. package/five/model/loaders/glTF-helpers/extensions/KHR_draco_mesh_compression.d.ts +11 -0
  386. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting.d.ts +26 -0
  387. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +11 -0
  388. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts +13 -0
  389. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +10 -0
  390. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_emissive_strength.d.ts +10 -0
  391. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_sheen.d.ts +10 -0
  392. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_transmission.d.ts +10 -0
  393. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_unlit.d.ts +10 -0
  394. package/five/model/loaders/glTF-helpers/extensions/KHR_mesh_quantization.d.ts +6 -0
  395. package/five/model/loaders/glTF-helpers/extensions/KHR_node_visibility.d.ts +10 -0
  396. package/five/model/loaders/glTF-helpers/extensions/KHR_texture_basisu.d.ts +9 -0
  397. package/five/model/loaders/glTF-helpers/extensions/KHR_texture_transform.d.ts +10 -0
  398. package/five/model/loaders/glTF-helpers/extensions/REALSEE_materials_lightmap.d.ts +7 -0
  399. package/five/model/loaders/glTF-helpers/extensions/base.d.ts +25 -0
  400. package/five/model/loaders/glTF-helpers/glTF.d.ts +713 -0
  401. package/five/model/loaders/glTF-helpers/index.d.ts +51 -0
  402. package/five/model/loaders/glTF-helpers/parser.d.ts +115 -0
  403. package/five/model/loaders/glTF-helpers/type.d.ts +14 -0
  404. package/five/model/loaders/gltf.d.ts +10 -0
  405. package/five/model/loaders/obj.d.ts +9 -0
  406. package/five/model/loaders/pbm.d.ts +26 -0
  407. package/five/model/loaders/ply.d.ts +24 -0
  408. package/five/model/loaders/pnts.d.ts +8 -0
  409. package/five/model/loaders/protobuf/dome.d.ts +540 -0
  410. package/five/model/loaders/protobuf/pbm.d.ts +203 -0
  411. package/five/model/loaders/shared.d.ts +16 -0
  412. package/five/model/loaders/splat.d.ts +8 -0
  413. package/five/model/loaders/spz.d.ts +14 -0
  414. package/five/model/loaders/tile3d-helpers/feature-table.d.ts +15 -0
  415. package/five/model/loaders/tile3d-helpers/gl-type.d.ts +20 -0
  416. package/five/model/loaders/tile3d-helpers/parse-gltf-array-buffer.d.ts +2 -0
  417. package/five/model/loaders/tile3d-helpers/parse-header.d.ts +2 -0
  418. package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.d.ts +2 -0
  419. package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.worker.d.ts +6 -0
  420. package/five/model/loaders/tile3d-helpers/parse-table.d.ts +3 -0
  421. package/five/model/loaders/tile3d-helpers/tile3d-type.d.ts +35 -0
  422. package/five/model/loaders/x3p.d.ts +22 -0
  423. package/five/model/materials/pbmMaterial.d.ts +137 -0
  424. package/five/model/materials/pbmMeshMaterial.d.ts +126 -0
  425. package/five/model/materials/pbmPointCloudMaterial.d.ts +70 -0
  426. package/five/model/model-scene.d.ts +172 -0
  427. package/five/model/model.d.ts +209 -0
  428. package/five/model/objects/pbmContainer.d.ts +28 -0
  429. package/five/model/objects/pbmGaussianSplattingObject.d.ts +43 -0
  430. package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +59 -0
  431. package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
  432. package/five/model/objects/pbmGroup.d.ts +8 -0
  433. package/five/model/objects/pbmMesh.d.ts +10 -0
  434. package/five/model/objects/pbmPointCloud.d.ts +7 -0
  435. package/five/model/parameter.d.ts +141 -0
  436. package/five/model/shaders/pbm_gaussian_splatting/fragment.d.ts +2 -0
  437. package/five/model/shaders/pbm_gaussian_splatting/vertex.d.ts +2 -0
  438. package/five/model/shaders/pbm_mesh_basic/fragment.d.ts +2 -0
  439. package/five/model/shaders/pbm_mesh_basic/vertex.d.ts +2 -0
  440. package/five/model/shaders/pbm_mesh_none/fragment.d.ts +2 -0
  441. package/five/model/shaders/pbm_mesh_none/vertex.d.ts +2 -0
  442. package/five/model/shaders/pbm_mesh_phong/fragment.d.ts +2 -0
  443. package/five/model/shaders/pbm_mesh_phong/vertex.d.ts +2 -0
  444. package/five/model/shaders/pbm_mesh_standard/fragment.d.ts +2 -0
  445. package/five/model/shaders/pbm_mesh_standard/vertex.d.ts +2 -0
  446. package/five/model/shaders/pbm_pointcloud/fragment.d.ts +2 -0
  447. package/five/model/shaders/pbm_pointcloud/vertex.d.ts +2 -0
  448. package/five/model/tile3d/header.d.ts +88 -0
  449. package/five/model/tile3d/index.d.ts +216 -0
  450. package/five/model/tile3d/tile-cache.d.ts +18 -0
  451. package/five/model/tile3d/tile-content.d.ts +10 -0
  452. package/five/model/tile3d/tile-node.d.ts +24 -0
  453. package/five/model/tile3d/tile-request-scheduler.d.ts +17 -0
  454. package/five/model/tile3d/tile.d.ts +79 -0
  455. package/five/model/tile3d/tileset-base-traverser.d.ts +59 -0
  456. package/five/model/tile3d/tileset-most-detail-traverser.d.ts +14 -0
  457. package/five/model/tile3d/tileset-normal-traverser.d.ts +15 -0
  458. package/five/model/tile3d/tileset-skip-traverser.d.ts +60 -0
  459. package/five/model/tile3d/tileset.d.ts +70 -0
  460. package/five/model/tile3d/trajectory-content.d.ts +9 -0
  461. package/five/model/tile3d/trajectory-node.d.ts +15 -0
  462. package/five/model/tile3d/trajectory.d.ts +30 -0
  463. package/five/model/tile3d/types.d.ts +33 -0
  464. package/five/model/view-layer.d.ts +20 -0
  465. package/five/renderer/five-renderer.d.ts +17 -0
  466. package/five/renderer/index.d.ts +3 -0
  467. package/five/renderer/postprocessing/composer.d.ts +37 -0
  468. package/five/renderer/postprocessing/index.d.ts +7 -0
  469. package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +17 -0
  470. package/five/renderer/postprocessing/passes/eye-dome-lighting-pass.d.ts +14 -0
  471. package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +36 -0
  472. package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +36 -0
  473. package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +12 -0
  474. package/five/renderer/postprocessing/passes/pass.d.ts +38 -0
  475. package/five/renderer/scene-renderers/point-cloud-high-quality-scene-renderer.d.ts +11 -0
  476. package/five/renderer/scene-renderers/scene-renderer.d.ts +9 -0
  477. package/five/renderer/scene-renderers/ssaa-scene-renderer.d.ts +15 -0
  478. package/five/renderer/tools/full-screen-quad.d.ts +15 -0
  479. package/five/renderer/tools/render-cube-to-equirectangular.d.ts +7 -0
  480. package/five/renderer/tools/render-full-screen-depth.d.ts +2 -0
  481. package/five/renderer/tools/render-full-screen.d.ts +2 -0
  482. package/five/texture/histogram.d.ts +54 -0
  483. package/five/texture/imageBitmap.d.ts +13 -0
  484. package/five/texture/initTexture.d.ts +3 -0
  485. package/five/texture/loader.d.ts +39 -0
  486. package/five/texture/textureData.d.ts +11 -0
  487. package/five/thirdparty/fflate.d.ts +1407 -0
  488. package/five/thirdparty/hammer.d.ts +375 -0
  489. package/five/thirdparty/jsrsasign.d.ts +753 -0
  490. package/five/thirdparty/meshopt_decoder.d.ts +15 -0
  491. package/five/three-version-check.d.ts +1 -0
  492. package/five/types/addableObject.d.ts +12 -0
  493. package/five/types/cube.d.ts +1 -0
  494. package/five/types/gestureInput.d.ts +24 -0
  495. package/five/types/imageOptions.d.ts +20 -0
  496. package/five/types/intersectMeshInterface.d.ts +8 -0
  497. package/five/types/movePanoEffect.d.ts +13 -0
  498. package/five/types/movePanoOptions.d.ts +36 -0
  499. package/five/types/panoCircleMeshInterface.d.ts +34 -0
  500. package/five/types/plugin.d.ts +25 -0
  501. package/five/types/pose.d.ts +17 -0
  502. package/five/types/state.d.ts +20 -0
  503. package/five/types/viewport.d.ts +22 -0
  504. package/five/utils/ajax.d.ts +66 -0
  505. package/five/utils/animationFrameLoop.d.ts +45 -0
  506. package/five/utils/array.d.ts +31 -0
  507. package/five/utils/asyncTaskQueue.d.ts +8 -0
  508. package/five/utils/bufferGeometry.d.ts +33 -0
  509. package/five/utils/calculateProgress.d.ts +39 -0
  510. package/five/utils/calculateThreeMouse.d.ts +13 -0
  511. package/five/utils/canplayVideo.d.ts +2 -0
  512. package/five/utils/clamp.d.ts +2 -0
  513. package/five/utils/clock.d.ts +17 -0
  514. package/five/utils/createSymbol.d.ts +5 -0
  515. package/five/utils/decodeText.d.ts +2 -0
  516. package/five/utils/deepEqual.d.ts +2 -0
  517. package/five/utils/deepFreeze.d.ts +2 -0
  518. package/five/utils/defineProperty.d.ts +9 -0
  519. package/five/utils/detector.d.ts +14 -0
  520. package/five/utils/distance.d.ts +10 -0
  521. package/five/utils/draco.d.ts +26 -0
  522. package/five/utils/easing.d.ts +63 -0
  523. package/five/utils/error.d.ts +1 -0
  524. package/five/utils/event.d.ts +210 -0
  525. package/five/utils/formatRad.d.ts +7 -0
  526. package/five/utils/imageSupport.d.ts +6 -0
  527. package/five/utils/imageURL.d.ts +42 -0
  528. package/five/utils/isEmptyObject.d.ts +2 -0
  529. package/five/utils/isNil.d.ts +6 -0
  530. package/five/utils/isNumber.d.ts +2 -0
  531. package/five/utils/isPowerOfTwo.d.ts +2 -0
  532. package/five/utils/isPromise.d.ts +2 -0
  533. package/five/utils/isSimilar.d.ts +6 -0
  534. package/five/utils/json.d.ts +7 -0
  535. package/five/utils/ktx2.d.ts +30 -0
  536. package/five/utils/lzma/index.d.ts +2 -0
  537. package/five/utils/lzma/lzma.d.ts +3 -0
  538. package/five/utils/lzma/lzmaWASM.d.ts +2 -0
  539. package/five/utils/lzma/lzmaWorker.d.ts +14 -0
  540. package/five/utils/memoryUsage.d.ts +29 -0
  541. package/five/utils/motion.d.ts +38 -0
  542. package/five/utils/noop.d.ts +6 -0
  543. package/five/utils/now.d.ts +7 -0
  544. package/five/utils/pano.d.ts +9 -0
  545. package/five/utils/pick.d.ts +3 -0
  546. package/five/utils/poseUtils.d.ts +5 -0
  547. package/five/utils/renderCubeTextureToCubeRenderTarget.d.ts +3 -0
  548. package/five/utils/renderDepth.d.ts +2 -0
  549. package/five/utils/renderTexturesToCubeRenderTarget.d.ts +10 -0
  550. package/five/utils/requestPermission.d.ts +3 -0
  551. package/five/utils/shaderContentFix.d.ts +7 -0
  552. package/five/utils/shaderMaterial.d.ts +20 -0
  553. package/five/utils/stateUtils.d.ts +5 -0
  554. package/five/utils/string-pattern.d.ts +8 -0
  555. package/five/utils/subscribe.d.ts +67 -0
  556. package/five/utils/tileCube.d.ts +19 -0
  557. package/five/utils/toFastProperties.d.ts +1 -0
  558. package/five/utils/typedCache.d.ts +10 -0
  559. package/five/utils/uniform.d.ts +15 -0
  560. package/five/utils/url.d.ts +35 -0
  561. package/five/utils/uuid.d.ts +5 -0
  562. package/five/utils/values.d.ts +2 -0
  563. package/five/utils/vectorCoordinates.d.ts +29 -0
  564. package/five/utils/volume.d.ts +111 -0
  565. package/five/utils/webglError.d.ts +7 -0
  566. package/five/utils/worker.d.ts +26 -0
  567. package/five/webxr/XRControllerModelFactory.d.ts +28 -0
  568. package/five/webxr/motionHelper.d.ts +68 -0
  569. package/five/webxr/xrButton.d.ts +4 -0
  570. package/five/webxr/xrController.d.ts +24 -0
  571. package/five/webxr/xrManager.d.ts +84 -0
  572. package/five/work/_ALLOW_HOST.d.ts +2 -0
  573. package/five/work/index.d.ts +7 -0
  574. package/five/work/keychain.d.ts +5 -0
  575. package/five/work/looseWorkType.d.ts +121 -0
  576. package/five/work/verify.d.ts +7 -0
  577. package/five/work/work.d.ts +206 -0
  578. package/five/work/workFetcher.d.ts +4 -0
  579. package/five/work/workJson.d.ts +3 -0
  580. package/five/work/workJsonType.d.ts +73 -0
  581. package/five/work/workObserverProto.d.ts +39 -0
  582. package/five/work/workParser.d.ts +6 -0
  583. package/five/work/workResolvedObserver.d.ts +12 -0
  584. package/five/work/workVerify.d.ts +2 -0
  585. package/five/work/works.d.ts +10 -0
  586. package/gltf-loader/gltf-object.d.ts +17 -0
  587. package/gltf-loader/index.d.ts +60 -160
  588. package/gltf-loader/index.js +9 -9
  589. package/gltf-loader/index.mjs +1351 -1451
  590. package/gltf-loader/thirdparty/DDSLoader.d.ts +23 -0
  591. package/gltf-loader/thirdparty/DRACOLoader.d.ts +18 -0
  592. package/gltf-loader/thirdparty/GLTFLoader.d.ts +59 -0
  593. package/line/circle_png.d.ts +1 -0
  594. package/line/index.d.ts +19 -69
  595. package/line/index.js +4 -4
  596. package/line/index.mjs +334 -513
  597. package/line/utils/Line2.d.ts +7 -0
  598. package/line/utils/LineGeometry.d.ts +10 -0
  599. package/line/utils/LineMaterial.d.ts +20 -0
  600. package/line/utils/LineSegments2.d.ts +11 -0
  601. package/line/utils/LineSegmentsGeometry.d.ts +15 -0
  602. package/llms.txt +48 -3
  603. package/package.json +4 -4
  604. package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
  605. package/plugins/BackgroundPlugin/index.d.ts +5 -0
  606. package/plugins/BackgroundPlugin/typings.d.ts +44 -0
  607. package/plugins/BasePlugin/index.d.ts +119 -0
  608. package/plugins/CSS3DPlugin/Controller.d.ts +60 -0
  609. package/plugins/CSS3DPlugin/index.d.ts +5 -0
  610. package/plugins/CSS3DPlugin/typing.d.ts +32 -0
  611. package/plugins/DynamicPathLinePlugin/Controller.d.ts +167 -0
  612. package/plugins/DynamicPathLinePlugin/index.d.ts +5 -0
  613. package/plugins/DynamicPathLinePlugin/line2/Line2.d.ts +7 -0
  614. package/plugins/DynamicPathLinePlugin/line2/LineGeometry.d.ts +10 -0
  615. package/plugins/DynamicPathLinePlugin/line2/LineMaterial.d.ts +17 -0
  616. package/plugins/DynamicPathLinePlugin/line2/LineSegments2.d.ts +11 -0
  617. package/plugins/DynamicPathLinePlugin/line2/LineSegmentsGeometry.d.ts +15 -0
  618. package/plugins/DynamicPathLinePlugin/typing.d.ts +129 -0
  619. package/plugins/DynamicPathLinePlugin/typings.d.ts +72 -0
  620. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.d.ts +30 -0
  621. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.d.ts +5 -0
  622. package/plugins/GaussianSplattingEntranceAnimationPlugin/typing.d.ts +28 -0
  623. package/plugins/ItemMaskPlugin/Controller.d.ts +48 -0
  624. package/plugins/ItemMaskPlugin/index.d.ts +5 -0
  625. package/plugins/ItemMaskPlugin/typing.d.ts +58 -0
  626. package/plugins/OrientationPlugin/Controller.d.ts +82 -0
  627. package/plugins/OrientationPlugin/RoundedBoxGeometry.d.ts +11 -0
  628. package/plugins/OrientationPlugin/index.d.ts +6 -0
  629. package/plugins/OrientationPlugin/typing.d.ts +25 -0
  630. package/plugins/PanoAnimePlugin/Controller.d.ts +46 -0
  631. package/plugins/PanoAnimePlugin/index.d.ts +5 -0
  632. package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
  633. package/plugins/PluginTemplate/Controller.d.ts +27 -0
  634. package/plugins/PluginTemplate/index.d.ts +5 -0
  635. package/plugins/PluginTemplate/typing.d.ts +21 -0
  636. package/plugins/TrajectoryPlugin/Controller.d.ts +85 -0
  637. package/plugins/TrajectoryPlugin/index.d.ts +6 -0
  638. package/plugins/TrajectoryPlugin/typing.d.ts +25 -0
  639. package/plugins/index.d.ts +11 -1102
  640. package/plugins/index.js +37 -21
  641. package/plugins/index.mjs +3630 -4247
  642. package/plugins/thirdParty/CSS3DRenderer.d.ts +32 -0
  643. package/plugins/thirdParty/OrbitControls.d.ts +78 -0
  644. package/plugins/utils/absoluteUrl.d.ts +5 -0
  645. package/plugins/utils/clamp.d.ts +2 -0
  646. package/plugins/utils/loadImage.d.ts +1 -0
  647. package/plugins/utils/motion.d.ts +38 -0
  648. package/plugins/utils/now.d.ts +6 -0
  649. package/plugins/utils/uuid.d.ts +2 -0
  650. package/react/canvas.d.ts +19 -0
  651. package/react/context.d.ts +12 -0
  652. package/react/createProvider.d.ts +95 -0
  653. package/react/createStore.d.ts +144 -0
  654. package/react/hooks/unsafe__useFiveInstance.d.ts +9 -0
  655. package/react/hooks/useFiveAction.d.ts +147 -0
  656. package/react/hooks/useFiveCameraDirection.d.ts +7 -0
  657. package/react/hooks/useFiveCameraRaycaster.d.ts +7 -0
  658. package/react/hooks/useFiveCurrentObserver.d.ts +11 -0
  659. package/react/hooks/useFiveCurrentState.d.ts +15 -0
  660. package/react/hooks/useFiveEventCallback.d.ts +12 -0
  661. package/react/hooks/useFiveFloor.d.ts +15 -0
  662. package/react/hooks/useFiveHelper.d.ts +14 -0
  663. package/react/hooks/useFiveModelBounding.d.ts +5 -0
  664. package/react/hooks/useFiveModelEffect.d.ts +14 -0
  665. package/react/hooks/useFiveModelIntersectRaycaster.d.ts +22 -0
  666. package/react/hooks/useFiveModelReadyState.d.ts +8 -0
  667. package/react/hooks/useFiveProject2d.d.ts +20 -0
  668. package/react/hooks/useFiveSceneEffect.d.ts +21 -0
  669. package/react/hooks/useFiveState.d.ts +6 -0
  670. package/react/hooks/useFiveWork.d.ts +29 -0
  671. package/react/index.d.ts +24 -830
  672. package/react/index.js +3 -3
  673. package/react/index.mjs +572 -783
  674. package/react/rendererPool.d.ts +7 -0
  675. package/react/withFive.d.ts +213 -0
  676. package/shader-lib/EvenessPlane/index.d.ts +10 -0
  677. package/shader-lib/PointCloudExpand/index.d.ts +59 -0
  678. package/shader-lib/PolygonCuter/index.d.ts +52 -0
  679. package/shader-lib/PolygonCuter/worker.d.ts +14 -0
  680. package/shader-lib/ShineModel/index.d.ts +7 -0
  681. package/shader-lib/SweepModel/index.d.ts +7 -0
  682. package/shader-lib/index.d.ts +5 -86
  683. package/shader-lib/index.js +13 -14
  684. package/shader-lib/index.mjs +424 -824
  685. package/sticker/geometry.d.ts +3 -0
  686. package/sticker/index.d.ts +68 -71
  687. package/sticker/index.js +3 -3
  688. package/sticker/index.mjs +102 -142
  689. package/umd/five-gltf-loader.js +9 -9
  690. package/umd/five-line.js +4 -4
  691. package/umd/five-plugins.js +37 -21
  692. package/umd/five-react.js +3 -3
  693. package/umd/five-shader-lib.js +13 -14
  694. package/umd/five-sticker.js +3 -3
  695. package/umd/five-vfx.js +21 -21
  696. package/umd/five-vue.js +3 -3
  697. package/umd/five.js +267 -387
  698. package/vfx/airflow/airflow.d.ts +18 -0
  699. package/vfx/airflow/fragment-shader.d.ts +2 -0
  700. package/vfx/airflow/vertex-shader.d.ts +2 -0
  701. package/vfx/common/scale-shader.d.ts +2 -0
  702. package/vfx/common/simplex-noise-shader.d.ts +2 -0
  703. package/vfx/frame/fragment-shader.d.ts +2 -0
  704. package/vfx/frame/frame.d.ts +22 -0
  705. package/vfx/frame/vertex-shader.d.ts +2 -0
  706. package/vfx/index.d.ts +7 -363
  707. package/vfx/index.js +21 -21
  708. package/vfx/index.mjs +454 -910
  709. package/vfx/particle/fragment-shader.d.ts +2 -0
  710. package/vfx/particle/instance.d.ts +36 -0
  711. package/vfx/particle/particle.d.ts +205 -0
  712. package/vfx/particle/utils.d.ts +11 -0
  713. package/vfx/particle/vertex-shader.d.ts +2 -0
  714. package/vfx/particle-gpu/fragment-shader.d.ts +2 -0
  715. package/vfx/particle-gpu/instance.d.ts +36 -0
  716. package/vfx/particle-gpu/particle.d.ts +95 -0
  717. package/vfx/particle-gpu/utils.d.ts +11 -0
  718. package/vfx/particle-gpu/vertex-shader.d.ts +2 -0
  719. package/vfx/spotLight/fragment-shader.d.ts +2 -0
  720. package/vfx/spotLight/spotLight.d.ts +15 -0
  721. package/vfx/spotLight/vertex-shader.d.ts +2 -0
  722. package/vue/context.d.ts +7 -0
  723. package/vue/hooks/FiveCanvas.d.ts +36 -0
  724. package/vue/hooks/FiveProvider.d.ts +35 -0
  725. package/vue/hooks/unsafe__useFiveInject.d.ts +9 -0
  726. package/vue/hooks/useFiveAction.d.ts +178 -0
  727. package/vue/hooks/useFiveCameraDirection.d.ts +8 -0
  728. package/vue/hooks/useFiveCameraRaycaster.d.ts +8 -0
  729. package/vue/hooks/useFiveCurrentObserver.d.ts +12 -0
  730. package/vue/hooks/useFiveCurrentState.d.ts +16 -0
  731. package/vue/hooks/useFiveEventCallback.d.ts +11 -0
  732. package/vue/hooks/useFiveFloor.d.ts +16 -0
  733. package/vue/hooks/useFiveHelper.d.ts +15 -0
  734. package/vue/hooks/useFiveModel.d.ts +7 -0
  735. package/vue/hooks/useFiveModelBounding.d.ts +7 -0
  736. package/vue/hooks/useFiveModelIntersectRaycaster.d.ts +23 -0
  737. package/vue/hooks/useFiveModelReadyState.d.ts +9 -0
  738. package/vue/hooks/useFiveProject2d.d.ts +26 -0
  739. package/vue/hooks/useFiveScene.d.ts +6 -0
  740. package/vue/hooks/useFiveState.d.ts +16 -0
  741. package/vue/hooks/useFiveWork.d.ts +30 -0
  742. package/vue/index.d.ts +23 -467
  743. package/vue/index.js +3 -3
  744. package/vue/index.mjs +309 -301
  745. package/vue/rendererPool.d.ts +10 -0
  746. package/work-downloader/components/model-3d-tile.d.ts +2 -0
  747. package/work-downloader/components/model.d.ts +3 -0
  748. package/work-downloader/components/observer.d.ts +7 -0
  749. package/work-downloader/download.d.ts +16 -0
  750. package/work-downloader/index.d.ts +2 -33
  751. package/work-downloader/index.js +3 -3
  752. package/work-downloader/index.mjs +317 -556
  753. package/work-downloader/type.d.ts +28 -0
  754. package/work-downloader/utils/download-to-file.d.ts +1 -0
  755. package/work-downloader/utils/image-processing.d.ts +7 -0
  756. package/work-downloader/utils/join-url.d.ts +2 -0
  757. package/work-downloader/utils/log.d.ts +1 -0
  758. package/work-downloader/utils/relative-url.d.ts +1 -0
  759. package/ai_guides/plugin.md +0 -206
  760. package/docs/documents/plugin.html +0 -60
  761. package/docs/media/five.ts +0 -2881
  762. package/docs/media/pass.ts +0 -64
@@ -0,0 +1,105 @@
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>features/plugin | 如视 Five SDK</title><meta name="description" content="Documentation for 如视 Five SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">如视 Five SDK</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">features/plugin</a></li></ul></div><div class="tsd-panel tsd-typography"><h1 id="插件系统-plugin-system" class="tsd-anchor-link">插件系统 (Plugin System)<a href="#插件系统-plugin-system" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1>
2
+ <ul>
3
+ <li><strong>Summary</strong>: Five 插件系统基于 <code>BasePlugin</code> 命名空间构建,提供了一套标准化的状态管理、生命周期控制和事件通信机制。</li>
4
+ <li><strong>Schema</strong>: 核心类型定义位于 <code>BasePlugin</code> 命名空间。</li>
5
+ <li><strong>Concepts</strong>: BasePlugin, State, Lifecycle, Controller.</li>
6
+ <li><strong>Configuration</strong>: 插件特定的参数配置。</li>
7
+ <li><strong>Examples</strong>: 标准插件开发示例。</li>
8
+ </ul>
9
+ <h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
10
+ <blockquote>
11
+ <p><strong>Definition</strong>: <a href="../../plugins/BasePlugin/index.d.ts">BasePlugin</a></p>
12
+ </blockquote>
13
+ <p><code>BasePlugin</code> 是一个命名空间,包含 <code>Controller</code> (抽象基类), <code>State</code> (状态接口), <code>EventMap</code> (事件映射) 等核心定义。</p>
14
+ <pre><code class="typescript"><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">namespace</span><span class="hl-1"> </span><span class="hl-7">BasePlugin</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">State</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">enabled</span><span class="hl-1">: </span><span class="hl-7">boolean</span><br/><span class="hl-1"> </span><span class="hl-6">visible</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><br/><span class="hl-1"> </span><span class="hl-6">config</span><span class="hl-1">?: </span><span class="hl-7">unknown</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">abstract</span><span class="hl-1"> </span><span class="hl-3">class</span><span class="hl-1"> </span><span class="hl-7">Controller</span><span class="hl-1">&lt;</span><span class="hl-7">PluginState</span><span class="hl-1">, </span><span class="hl-7">PluginEventMap</span><span class="hl-1">, </span><span class="hl-7">PluginServerData</span><span class="hl-1">, </span><span class="hl-7">PluginData</span><span class="hl-1">&gt; {</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">five</span><span class="hl-1">: </span><span class="hl-7">Five</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-3">abstract</span><span class="hl-1"> </span><span class="hl-6">state</span><span class="hl-1">: </span><span class="hl-7">PluginState</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">hooks</span><span class="hl-1">: </span><span class="hl-7">Subscribe</span><span class="hl-1">&lt;</span><span class="hl-7">PluginEventMap</span><span class="hl-1">&gt;</span><br/><span class="hl-1"> </span><span class="hl-8">// ...</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
15
+ </code><button type="button">Copy</button></pre>
16
+
17
+ <h2 id="concepts" class="tsd-anchor-link">Concepts<a href="#concepts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
18
+ <h3 id="directory-structure-目录结构" class="tsd-anchor-link">Directory Structure (目录结构)<a href="#directory-structure-目录结构" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
19
+ <p>一个标准的插件通常包含以下文件:</p>
20
+ <pre><code class="text">PluginName/
21
+ ├── index.ts # 插件入口,导出工厂函数和类型
22
+ ├── Controller.ts # 插件控制器,核心逻辑实现
23
+ └── typing.ts # 类型定义
24
+ </code><button type="button">Copy</button></pre>
25
+
26
+ <h3 id="baseplugin" class="tsd-anchor-link">BasePlugin<a href="#baseplugin" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
27
+ <p>所有插件推荐继承 <code>BasePlugin.Controller</code>。它定义了规范的泛型接口:</p>
28
+ <ul>
29
+ <li><code>PluginState</code>: 插件状态类型,继承自 <code>BasePlugin.State</code>。</li>
30
+ <li><code>PluginEventMap</code>: 插件事件类型,继承自 <code>BasePlugin.EventMap</code>。</li>
31
+ <li><code>PluginServerData</code>: 服务端原始数据类型。</li>
32
+ <li><code>PluginData</code>: 解析后的插件数据类型。</li>
33
+ </ul>
34
+ <h3 id="state-状态" class="tsd-anchor-link">State (状态)<a href="#state-状态" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
35
+ <p>插件的状态驱动其行为。<code>BasePlugin.State</code> 定义了最基本的状态:</p>
36
+ <ul>
37
+ <li><code>enabled</code>: 是否启用。</li>
38
+ <li><code>visible</code>: UI 是否可见。</li>
39
+ <li><code>config</code>: 配置项。</li>
40
+ </ul>
41
+ <h3 id="lifecycle-生命周期" class="tsd-anchor-link">Lifecycle (生命周期)<a href="#lifecycle-生命周期" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
42
+ <p>插件的主要生命周期方法:</p>
43
+ <ul>
44
+ <li><strong>constructor</strong>: 初始化配置和初始状态。</li>
45
+ <li><strong>load</strong>: 加载和解析数据。</li>
46
+ <li><strong>enable</strong>: 启用插件,注册事件监听,添加副作用。</li>
47
+ <li><strong>disable</strong>: 禁用插件,移除事件监听,清理副作用。</li>
48
+ <li><strong>dispose</strong>: 销毁插件,彻底清理资源。</li>
49
+ </ul>
50
+ <h2 id="configuration" class="tsd-anchor-link">Configuration<a href="#configuration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
51
+ <h3 id="baseplugin-configuration" class="tsd-anchor-link">BasePlugin Configuration<a href="#baseplugin-configuration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
52
+ <p><code>BasePlugin</code> 控制器构造函数接受可选的配置对象:</p>
53
+ <table>
54
+ <thead>
55
+ <tr>
56
+ <th style="text-align:left">Parameter</th>
57
+ <th style="text-align:left">Type</th>
58
+ <th style="text-align:left">Default</th>
59
+ <th style="text-align:left">Description</th>
60
+ </tr>
61
+ </thead>
62
+ <tbody>
63
+ <tr>
64
+ <td style="text-align:left"><code>staticPrefix</code></td>
65
+ <td style="text-align:left"><code>string</code></td>
66
+ <td style="text-align:left"><code>'//vr-image-4.realsee-cdn.cn'</code></td>
67
+ <td style="text-align:left">静态资源前缀。</td>
68
+ </tr>
69
+ <tr>
70
+ <td style="text-align:left"><code>i18n</code></td>
71
+ <td style="text-align:left"><code>(key: string) =&gt; string</code></td>
72
+ <td style="text-align:left"><code>undefined</code></td>
73
+ <td style="text-align:left">国际化转换函数。</td>
74
+ </tr>
75
+ </tbody>
76
+ </table>
77
+ <h2 id="examples" class="tsd-anchor-link">Examples<a href="#examples" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
78
+ <h3 id="plugin-development-walkthrough-插件开发指南" class="tsd-anchor-link">Plugin Development Walkthrough (插件开发指南)<a href="#plugin-development-walkthrough-插件开发指南" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
79
+ <p>以创建一个 <code>MyPlugin</code> 为例。</p>
80
+ <h4 id="1-定义类型-typingts" class="tsd-anchor-link">1. 定义类型 (typing.ts)<a href="#1-定义类型-typingts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
81
+ <p>定义插件所需的参数、状态、数据和事件类型。</p>
82
+ <pre><code class="typescript"><span class="hl-10">import</span><span class="hl-1"> { </span><span class="hl-6">BasePlugin</span><span class="hl-1"> } </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">&#39;../BasePlugin&#39;</span><br/><br/><span class="hl-8">// 1. 定义参数</span><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Params</span><span class="hl-1"> </span><span class="hl-3">extends</span><span class="hl-1"> </span><span class="hl-7">BasePlugin</span><span class="hl-1">.</span><span class="hl-7">Config</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">initialState</span><span class="hl-1">?: </span><span class="hl-7">Partial</span><span class="hl-1">&lt;</span><span class="hl-7">State</span><span class="hl-1">&gt;</span><br/><span class="hl-1"> </span><span class="hl-6">config</span><span class="hl-1">?: </span><span class="hl-7">Config</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-8">// 2. 定义配置</span><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Config</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">color</span><span class="hl-1">?: </span><span class="hl-7">string</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-8">// 3. 定义状态 (继承 BasePlugin.State)</span><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">State</span><span class="hl-1"> </span><span class="hl-3">extends</span><span class="hl-1"> </span><span class="hl-7">BasePlugin</span><span class="hl-1">.</span><span class="hl-7">State</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">activeId</span><span class="hl-1">?: </span><span class="hl-7">string</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-8">// 4. 定义数据类型</span><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">ServerData</span><span class="hl-1"> { </span><span class="hl-8">/* 服务端数据结构 */</span><span class="hl-1"> }</span><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">PluginData</span><span class="hl-1"> { </span><span class="hl-8">/* 解析后的数据结构 */</span><span class="hl-1"> }</span><br/><br/><span class="hl-8">// 5. 定义事件 (继承 BasePlugin.EventMap)</span><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">EventMap</span><span class="hl-1"> </span><span class="hl-3">extends</span><span class="hl-1"> </span><span class="hl-7">BasePlugin</span><span class="hl-1">.</span><span class="hl-7">EventMap</span><span class="hl-1">&lt;</span><span class="hl-7">State</span><span class="hl-1">, </span><span class="hl-7">PluginData</span><span class="hl-1">&gt; {</span><br/><span class="hl-1"> </span><span class="hl-5">click</span><span class="hl-1">: (</span><span class="hl-6">id</span><span class="hl-1">: </span><span class="hl-7">string</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">void</span><br/><span class="hl-1">}</span>
83
+ </code><button type="button">Copy</button></pre>
84
+
85
+ <h4 id="2-实现控制器-controllerts" class="tsd-anchor-link">2. 实现控制器 (Controller.ts)<a href="#2-实现控制器-controllerts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
86
+ <p>继承 <code>BasePlugin.Controller</code> 并实现核心逻辑。</p>
87
+ <pre><code class="typescript"><span class="hl-10">import</span><span class="hl-1"> { </span><span class="hl-6">Five</span><span class="hl-1"> } </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">&#39;@realsee/five&#39;</span><br/><span class="hl-10">import</span><span class="hl-1"> { </span><span class="hl-6">BasePlugin</span><span class="hl-1"> } </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">&#39;../BasePlugin&#39;</span><br/><span class="hl-10">import</span><span class="hl-1"> </span><span class="hl-3">*</span><span class="hl-1"> </span><span class="hl-10">as</span><span class="hl-1"> </span><span class="hl-6">MyPluginType</span><span class="hl-1"> </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">&#39;./typing&#39;</span><br/><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">class</span><span class="hl-1"> </span><span class="hl-7">Controller</span><span class="hl-1"> </span><span class="hl-3">extends</span><span class="hl-1"> </span><span class="hl-7">BasePlugin</span><span class="hl-1">.</span><span class="hl-7">Controller</span><span class="hl-1">&lt;</span><br/><span class="hl-1"> </span><span class="hl-7">MyPluginType</span><span class="hl-1">.</span><span class="hl-7">State</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">MyPluginType</span><span class="hl-1">.</span><span class="hl-7">EventMap</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">MyPluginType</span><span class="hl-1">.</span><span class="hl-7">ServerData</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">MyPluginType</span><span class="hl-1">.</span><span class="hl-7">PluginData</span><br/><span class="hl-1">&gt; {</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">state</span><span class="hl-1">: </span><span class="hl-7">MyPluginType</span><span class="hl-1">.</span><span class="hl-7">State</span><br/><br/><span class="hl-1"> </span><span class="hl-3">constructor</span><span class="hl-1">(</span><span class="hl-6">five</span><span class="hl-1">: </span><span class="hl-7">Five</span><span class="hl-1">, </span><span class="hl-6">params</span><span class="hl-1">?: </span><span class="hl-7">MyPluginType</span><span class="hl-1">.</span><span class="hl-7">Params</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">super</span><span class="hl-1">(</span><span class="hl-6">five</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-6">state</span><span class="hl-1"> = {</span><br/><span class="hl-1"> </span><span class="hl-6">enabled:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">visible:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1">,</span><br/><span class="hl-1"> ...</span><span class="hl-6">params</span><span class="hl-1">?.</span><span class="hl-6">initialState</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><span class="hl-10">if</span><span class="hl-1"> (</span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-6">state</span><span class="hl-1">.</span><span class="hl-6">enabled</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-5">_enable</span><span class="hl-1">()</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-3">async</span><span class="hl-1"> </span><span class="hl-5">load</span><span class="hl-1">(</span><span class="hl-6">serverData</span><span class="hl-1">: </span><span class="hl-7">MyPluginType</span><span class="hl-1">.</span><span class="hl-7">ServerData</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-8">// 解析数据</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-5">enable</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-10">if</span><span class="hl-1"> (</span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-6">state</span><span class="hl-1">.</span><span class="hl-6">enabled</span><span class="hl-1">) </span><span class="hl-10">return</span><br/><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-6">state</span><span class="hl-1">.</span><span class="hl-6">enabled</span><span class="hl-1"> = </span><span class="hl-3">true</span><br/><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-5">_enable</span><span class="hl-1">()</span><br/><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-6">hooks</span><span class="hl-1">.</span><span class="hl-5">emit</span><span class="hl-1">(</span><span class="hl-9">&#39;stateChange&#39;</span><span class="hl-1">, { </span><span class="hl-6">state:</span><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-6">state</span><span class="hl-1">, </span><span class="hl-6">userAction:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1"> })</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-5">disable</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-10">if</span><span class="hl-1"> (!</span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-6">state</span><span class="hl-1">.</span><span class="hl-6">enabled</span><span class="hl-1">) </span><span class="hl-10">return</span><br/><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-6">state</span><span class="hl-1">.</span><span class="hl-6">enabled</span><span class="hl-1"> = </span><span class="hl-3">false</span><br/><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-5">_disable</span><span class="hl-1">()</span><br/><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-6">hooks</span><span class="hl-1">.</span><span class="hl-5">emit</span><span class="hl-1">(</span><span class="hl-9">&#39;stateChange&#39;</span><span class="hl-1">, { </span><span class="hl-6">state:</span><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-6">state</span><span class="hl-1">, </span><span class="hl-6">userAction:</span><span class="hl-1"> </span><span class="hl-3">true</span><span class="hl-1"> })</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-5">dispose</span><span class="hl-1"> = () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-5">disable</span><span class="hl-1">()</span><br/><span class="hl-1"> </span><span class="hl-3">this</span><span class="hl-1">.</span><span class="hl-6">hooks</span><span class="hl-1">.</span><span class="hl-5">emit</span><span class="hl-1">(</span><span class="hl-9">&#39;dispose&#39;</span><span class="hl-1">)</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-3">private</span><span class="hl-1"> </span><span class="hl-5">_enable</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-8">// five.scene.add(...)</span><br/><span class="hl-1"> </span><span class="hl-8">// five.on(&#39;tap&#39;, this.onTap)</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-3">private</span><span class="hl-1"> </span><span class="hl-5">_disable</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-8">// five.scene.remove(...)</span><br/><span class="hl-1"> </span><span class="hl-8">// five.off(&#39;tap&#39;, this.onTap)</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
88
+ </code><button type="button">Copy</button></pre>
89
+
90
+ <h4 id="3-导出插件-indexts" class="tsd-anchor-link">3. 导出插件 (index.ts)<a href="#3-导出插件-indexts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
91
+ <p>提供一个工厂函数。</p>
92
+ <pre><code class="typescript"><span class="hl-10">import</span><span class="hl-1"> { </span><span class="hl-6">Five</span><span class="hl-1"> } </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">&#39;@realsee/five&#39;</span><br/><span class="hl-10">import</span><span class="hl-1"> { </span><span class="hl-6">Controller</span><span class="hl-1"> } </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">&#39;./Controller&#39;</span><br/><span class="hl-10">import</span><span class="hl-1"> </span><span class="hl-3">*</span><span class="hl-1"> </span><span class="hl-10">as</span><span class="hl-1"> </span><span class="hl-6">MyPluginType</span><span class="hl-1"> </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">&#39;./typing&#39;</span><br/><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-5">MyPlugin</span><span class="hl-1"> = (</span><span class="hl-6">five</span><span class="hl-1">: </span><span class="hl-7">Five</span><span class="hl-1">, </span><span class="hl-6">params</span><span class="hl-1">?: </span><span class="hl-7">MyPluginType</span><span class="hl-1">.</span><span class="hl-7">Params</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><br/><span class="hl-1"> </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-5">Controller</span><span class="hl-1">(</span><span class="hl-6">five</span><span class="hl-1">, </span><span class="hl-6">params</span><span class="hl-1">)</span><br/><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-10">type</span><span class="hl-1"> { </span><span class="hl-6">MyPluginType</span><span class="hl-1">, </span><span class="hl-6">Controller</span><span class="hl-1"> </span><span class="hl-10">as</span><span class="hl-1"> </span><span class="hl-6">MyPluginController</span><span class="hl-1"> }</span>
93
+ </code><button type="button">Copy</button></pre>
94
+
95
+ <h2 id="common-pitfalls-最佳实践" class="tsd-anchor-link">Common Pitfalls (最佳实践)<a href="#common-pitfalls-最佳实践" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
96
+ <ol>
97
+ <li><strong>状态驱动</strong>: 始终通过修改 <code>state</code> 来驱动插件行为,而不是直接操作 DOM 或 3D 对象。</li>
98
+ <li><strong>清理资源</strong>: 在 <code>disable</code> 和 <code>dispose</code> 中务必清理所有事件监听和副作用,防止内存泄漏。</li>
99
+ <li><strong>类型安全</strong>: 充分利用 TypeScript 泛型,确保事件和状态的类型安全。</li>
100
+ </ol>
101
+ <hr>
102
+ <pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">插件</span><span class="hl-1">, </span><span class="hl-2">插件开发</span><span class="hl-1">, </span><span class="hl-2">扩展</span><span class="hl-1">, </span><span class="hl-2">自定义功能</span><span class="hl-1">, </span><span class="hl-2">状态管理</span><span class="hl-1">, </span><span class="hl-2">plugin</span><span class="hl-1">, </span><span class="hl-2">baseplugin</span><span class="hl-1">, </span><span class="hl-2">development</span><span class="hl-1">, </span><span class="hl-2">guide</span><span class="hl-1">, </span><span class="hl-2">extension</span><span class="hl-1">, </span><span class="hl-2">lifecycle</span><span class="hl-1">]</span>
103
+ </code><button type="button">Copy</button></pre>
104
+
105
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#插件系统-plugin-system"><span>插件系统 (<wbr/>Plugin <wbr/>System)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#directory-structure-目录结构"><span>Directory <wbr/>Structure (目录结构)</span></a></li><li><a href="#baseplugin"><span>Base<wbr/>Plugin</span></a></li><li><a href="#state-状态"><span>State (状态)</span></a></li><li><a href="#lifecycle-生命周期"><span>Lifecycle (生命周期)</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#baseplugin-configuration"><span>Base<wbr/>Plugin <wbr/>Configuration</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#plugin-development-walkthrough-插件开发指南"><span>Plugin <wbr/>Development <wbr/>Walkthrough (插件开发指南)</span></a></li><li><ul><li><a href="#1-定义类型-typingts"><span>1. 定义类型 (typing.ts)</span></a></li><li><a href="#2-实现控制器-controllerts"><span>2. 实现控制器 (<wbr/>Controller.ts)</span></a></li><li><a href="#3-导出插件-indexts"><span>3. 导出插件 (index.ts)</span></a></li></ul></li></ul></li><li><a href="#common-pitfalls-最佳实践"><span>Common <wbr/>Pitfalls (最佳实践)</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1,12 +1,15 @@
1
1
  <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>features/postprocessing | 如视 Five SDK</title><meta name="description" content="Documentation for 如视 Five SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">如视 Five SDK</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">features/postprocessing</a></li></ul></div><div class="tsd-panel tsd-typography"><h1 id="后处理-post-processing" class="tsd-anchor-link">后处理 (Post Processing)<a href="#后处理-post-processing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1>
2
2
  <ul>
3
- <li><strong>Summary</strong>: Five 提供了基于 EffectComposer 的后处理机制,内置了自适应亮度 (Auto Exposure) 和眼球穹顶光照 (EDL) 两种效果,并支持开发者编写自定义 Pass。</li>
3
+ <li><strong>Summary</strong>: Five 提供了基于 EffectComposer 的后处理机制,默认挂载了自适应亮度 (Auto Exposure) 和眼球穹顶光照 (EDL) 两种效果,同时提供多种可选内置 Pass,并支持开发者编写自定义 Pass。</li>
4
4
  <li><strong>Schema</strong>: <code>FivePass</code> 类及 <code>Pass</code> 接口。</li>
5
5
  <li><strong>Concepts</strong>: EffectComposer, G-Buffer, Pass, AdaptiveLuminance, EyeDomeLighting。</li>
6
6
  <li><strong>Configuration</strong>: 开启内置 Pass 的开关及参数配置。</li>
7
7
  <li><strong>Examples</strong>: 开启内置 Pass 示例,自定义黑白滤镜 Pass 示例。</li>
8
8
  </ul>
9
9
  <h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
10
+ <blockquote>
11
+ <p><strong>Definition</strong>: <a href="../../five/renderer/postprocessing/passes/pass.d.ts">FivePass</a></p>
12
+ </blockquote>
10
13
  <pre><code class="typescript"><span class="hl-8">/**</span><br/><span class="hl-8"> * Pass 接口 (兼容 three.js EffectComposer)</span><br/><span class="hl-8"> */</span><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Pass</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">enabled</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">needsSwap</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">clear</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">renderToScreen</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-5">setSize</span><span class="hl-1">(</span><span class="hl-6">width</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">, </span><span class="hl-6">height</span><span class="hl-1">: </span><span class="hl-7">number</span><span class="hl-1">): </span><span class="hl-7">void</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-5">render</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-6">renderer</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">WebGLRenderer</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">writeBuffer</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">WebGLRenderTarget</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">readBuffer</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">WebGLRenderTarget</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">deltaTime</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">maskActive</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><br/><span class="hl-1"> ): </span><span class="hl-7">void</span><span class="hl-1">;</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-8">/**</span><br/><span class="hl-8"> * FivePass 基类</span><br/><span class="hl-8"> * 支持 G-Buffer 注入 (depth, normal, color)</span><br/><span class="hl-8"> */</span><br/><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">class</span><span class="hl-1"> </span><span class="hl-7">FivePass</span><span class="hl-1"> </span><span class="hl-3">implements</span><span class="hl-1"> </span><span class="hl-7">Pass</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">enabled</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1"> = </span><span class="hl-3">true</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">needsSwap</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1"> = </span><span class="hl-3">true</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">clear</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1"> = </span><span class="hl-3">false</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">renderToScreen</span><span class="hl-1">: </span><span class="hl-7">boolean</span><span class="hl-1"> = </span><span class="hl-3">true</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">dependencies</span><span class="hl-1">: (</span><span class="hl-9">&#39;depth&#39;</span><span class="hl-1"> | </span><span class="hl-9">&#39;normal&#39;</span><span class="hl-1"> | </span><span class="hl-9">&#39;color&#39;</span><span class="hl-1">)[];</span><br/><br/><span class="hl-1"> </span><span class="hl-8">// 由 EffectComposer 在 render 时注入</span><br/><span class="hl-1"> </span><span class="hl-3">public</span><span class="hl-1"> </span><span class="hl-6">gbuffer</span><span class="hl-1">!: </span><span class="hl-7">Map</span><span class="hl-1">&lt;</span><span class="hl-9">&#39;depth&#39;</span><span class="hl-1"> | </span><span class="hl-9">&#39;normal&#39;</span><span class="hl-1"> | </span><span class="hl-9">&#39;color&#39;</span><span class="hl-1">, </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Texture</span><span class="hl-1">&gt;;</span><br/><br/><span class="hl-1"> </span><span class="hl-3">constructor</span><span class="hl-1">(</span><span class="hl-6">dependencies</span><span class="hl-1">?: (</span><span class="hl-9">&#39;depth&#39;</span><span class="hl-1"> | </span><span class="hl-9">&#39;normal&#39;</span><span class="hl-1"> | </span><span class="hl-9">&#39;color&#39;</span><span class="hl-1">)[]);</span><br/><span class="hl-1"> </span><span class="hl-8">// ... render method implementation</span><br/><span class="hl-1">}</span>
11
14
  </code><button type="button">Copy</button></pre>
12
15
 
@@ -18,7 +21,7 @@
18
21
  <li><strong>EyeDomeLightingPass (EDL)</strong>: 一种非真实感渲染技术,主要用于增强点云模型的深度感知。通过屏幕空间的深度差计算遮蔽效果,让点云看起来更有轮廓感。</li>
19
22
  </ul>
20
23
  <h2 id="built-in-passes-内置-pass" class="tsd-anchor-link">Built-in Passes (内置 Pass)<a href="#built-in-passes-内置-pass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
21
- <p>Five 内置了两个 Pass 实例,挂载在 <code>five</code> 实例上,默认是关闭状态。</p>
24
+ <p>Five 默认挂载了两个 Pass 实例,挂载在 <code>five</code> 实例上,默认是关闭状态。</p>
22
25
  <h3 id="1-adaptiveluminancepass" class="tsd-anchor-link">1. AdaptiveLuminancePass<a href="#1-adaptiveluminancepass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
23
26
  <p>位于 <code>five.adaptiveLuminancePass</code>。</p>
24
27
  <ul>
@@ -44,6 +47,17 @@
44
47
  </li>
45
48
  <li><strong>注意</strong>: 这是一个基于屏幕空间深度的算法,依赖 Depth Buffer。</li>
46
49
  </ul>
50
+ <h3 id="3-optional-built-in-passes-可选内置-pass" class="tsd-anchor-link">3. Optional Built-in Passes (可选内置 Pass)<a href="#3-optional-built-in-passes-可选内置-pass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
51
+ <p>Five 新增了三个可选使用的内置 Pass,这些 Pass 没有预先挂载在 <code>five</code> 实例上,需手动导入并添加到渲染链中:</p>
52
+ <ul>
53
+ <li><strong><a href="features_gaussian-blur-pass.html">GaussianBlurPass</a></strong>: 高斯模糊效果。</li>
54
+ <li><strong><a href="features_flowing-light-2d-pass.html">FlowingLight2DPass</a></strong>: 2D 流光效果(通常用于平面路线流光)。</li>
55
+ <li><strong><a href="features_flowing-light-3d-pass.html">FlowingLight3DPass</a></strong>: 3D 流光效果(通常用于空间路径流光)。</li>
56
+ </ul>
57
+ <h4 id="gaussianblurpass-使用示例" class="tsd-anchor-link">GaussianBlurPass 使用示例<a href="#gaussianblurpass-使用示例" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4>
58
+ <pre><code class="typescript"><span class="hl-10">import</span><span class="hl-1"> { </span><span class="hl-6">GaussianBlurPass</span><span class="hl-1"> } </span><span class="hl-10">from</span><span class="hl-1"> </span><span class="hl-9">&#39;@realsee/five&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-8">// 1. 创建 GaussianBlurPass 实例 (需要传入 camera)</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">gaussianBlurPass</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-5">GaussianBlurPass</span><span class="hl-1">(</span><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-6">camera</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 2. 配置参数</span><br/><span class="hl-8">// 设置模糊半径 (默认 4.0)</span><br/><span class="hl-6">gaussianBlurPass</span><span class="hl-1">.</span><span class="hl-5">setRadius</span><span class="hl-1">(</span><span class="hl-11">6</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 3. 将 Pass 添加到渲染链</span><br/><span class="hl-6">five</span><span class="hl-1">.</span><span class="hl-5">addPass</span><span class="hl-1">(</span><span class="hl-6">gaussianBlurPass</span><span class="hl-1">);</span><br/><br/><span class="hl-8">// 4. (可选) 动态开关</span><br/><span class="hl-8">// gaussianBlurPass.enabled = false;</span><br/><br/><span class="hl-8">// 5. (可选) 移除 Pass</span><br/><span class="hl-8">// five.removePass(gaussianBlurPass);</span>
59
+ </code><button type="button">Copy</button></pre>
60
+
47
61
  <h2 id="custom-pass-自定义-pass" class="tsd-anchor-link">Custom Pass (自定义 Pass)<a href="#custom-pass-自定义-pass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
48
62
  <p>如果需要实现自定义的后处理效果(如景深、色彩校正、描边等),建议继承 <code>FivePass</code>。</p>
49
63
  <h3 id="步骤" class="tsd-anchor-link">步骤<a href="#步骤" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
@@ -82,11 +96,14 @@
82
96
  </ol>
83
97
  <h2 id="related" class="tsd-anchor-link">Related<a href="#related" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
84
98
  <ul>
85
- <li><a href="../media/five.ts">five.ts</a>: 查看 <code>addPass</code> 方法的实现。</li>
86
- <li><a href="../media/pass.ts">pass.ts</a>: 查看 <code>FivePass</code> 基类定义。</li>
99
+ <li><a href="features_gaussian-blur-pass.html">Gaussian Blur Pass</a>: 高斯模糊 Pass 文档。</li>
100
+ <li><a href="features_flowing-light-2d-pass.html">Flowing Light 2D Pass</a>: 2D 流光 Pass 文档。</li>
101
+ <li><a href="features_flowing-light-3d-pass.html">Flowing Light 3D Pass</a>: 3D 流光 Pass 文档。</li>
102
+ <li><a href="../../five/application/five.d.ts">five.ts</a>: 查看 <code>addPass</code> 方法的实现。</li>
103
+ <li><a href="../../five/renderer/postprocessing/passes/pass.d.ts">pass.ts</a>: 查看 <code>FivePass</code> 基类定义。</li>
87
104
  </ul>
88
105
  <hr>
89
- <pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">postprocessing</span><span class="hl-1">, </span><span class="hl-2">shader</span><span class="hl-1">, </span><span class="hl-2">effect</span><span class="hl-1">, </span><span class="hl-2">adaptive-luminance</span><span class="hl-1">, </span><span class="hl-2">edl</span><span class="hl-1">]</span>
106
+ <pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">后处理</span><span class="hl-1">, </span><span class="hl-2">特效</span><span class="hl-1">, </span><span class="hl-2">自定义shader</span><span class="hl-1">, </span><span class="hl-2">滤镜</span><span class="hl-1">, </span><span class="hl-2">描边</span><span class="hl-1">, </span><span class="hl-2">景深</span><span class="hl-1">, </span><span class="hl-2">色彩校正</span><span class="hl-1">, </span><span class="hl-2">渲染管线</span><span class="hl-1">, </span><span class="hl-2">postprocessing</span><span class="hl-1">, </span><span class="hl-2">shader</span><span class="hl-1">, </span><span class="hl-2">effect</span><span class="hl-1">, </span><span class="hl-2">adaptive-luminance</span><span class="hl-1">, </span><span class="hl-2">edl</span><span class="hl-1">, </span><span class="hl-2">effect-composer</span><span class="hl-1">, </span><span class="hl-2">addPass</span><span class="hl-1">]</span>
90
107
  </code><button type="button">Copy</button></pre>
91
108
 
92
- </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#后处理-post-processing"><span>后处理 (<wbr/>Post <wbr/>Processing)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><a href="#built-in-passes-内置-pass"><span>Built-<wbr/>in <wbr/>Passes (内置 <wbr/>Pass)</span></a></li><li><ul><li><a href="#1-adaptiveluminancepass"><span>1. <wbr/>Adaptive<wbr/>Luminance<wbr/>Pass</span></a></li><li><a href="#2-eyedomelightingpass"><span>2. <wbr/>Eye<wbr/>Dome<wbr/>Lighting<wbr/>Pass</span></a></li></ul></li><li><a href="#custom-pass-自定义-pass"><span>Custom <wbr/>Pass (自定义 <wbr/>Pass)</span></a></li><li><ul><li><a href="#步骤"><span>步骤</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#开启内置-pass"><span>开启内置 <wbr/>Pass</span></a></li><li><a href="#自定义-pass-黑白滤镜"><span>自定义 <wbr/>Pass (黑白滤镜)</span></a></li><li><a href="#使用-g-buffer-深度图示例"><span>使用 <wbr/>G-<wbr/>Buffer (深度图示例)</span></a></li></ul></li><li><a href="#debugging"><span>Debugging</span></a></li><li><a href="#common-pitfalls"><span>Common <wbr/>Pitfalls</span></a></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
109
+ </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#后处理-post-processing"><span>后处理 (<wbr/>Post <wbr/>Processing)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><a href="#built-in-passes-内置-pass"><span>Built-<wbr/>in <wbr/>Passes (内置 <wbr/>Pass)</span></a></li><li><ul><li><a href="#1-adaptiveluminancepass"><span>1. <wbr/>Adaptive<wbr/>Luminance<wbr/>Pass</span></a></li><li><a href="#2-eyedomelightingpass"><span>2. <wbr/>Eye<wbr/>Dome<wbr/>Lighting<wbr/>Pass</span></a></li><li><a href="#3-optional-built-in-passes-可选内置-pass"><span>3. <wbr/>Optional <wbr/>Built-<wbr/>in <wbr/>Passes (可选内置 <wbr/>Pass)</span></a></li><li><ul><li><a href="#gaussianblurpass-使用示例"><span>Gaussian<wbr/>Blur<wbr/>Pass 使用示例</span></a></li></ul></li></ul></li><li><a href="#custom-pass-自定义-pass"><span>Custom <wbr/>Pass (自定义 <wbr/>Pass)</span></a></li><li><ul><li><a href="#步骤"><span>步骤</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#开启内置-pass"><span>开启内置 <wbr/>Pass</span></a></li><li><a href="#自定义-pass-黑白滤镜"><span>自定义 <wbr/>Pass (黑白滤镜)</span></a></li><li><a href="#使用-g-buffer-深度图示例"><span>使用 <wbr/>G-<wbr/>Buffer (深度图示例)</span></a></li></ul></li><li><a href="#debugging"><span>Debugging</span></a></li><li><a href="#common-pitfalls"><span>Common <wbr/>Pitfalls</span></a></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -6,8 +6,11 @@
6
6
  <li><strong>Examples</strong>: 提供基础检测与性能优化示例。</li>
7
7
  </ul>
8
8
  <h2 id="schema-threejs-raycaster-extensions" class="tsd-anchor-link">Schema: Three.js Raycaster Extensions<a href="#schema-threejs-raycaster-extensions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
9
+ <blockquote>
10
+ <p><strong>Definition</strong>: <a href="../../five/declare.d.ts">Raycaster</a></p>
11
+ </blockquote>
9
12
  <p>Five 对 Three.js 的 <code>Raycaster</code> 进行了扩展,在 <code>declare module 'three'</code> 中增加了以下属性:</p>
10
- <pre><code class="typescript"><span class="hl-8">// defined in five/declare.d.ts</span><br/><span class="hl-3">declare</span><span class="hl-1"> </span><span class="hl-3">module</span><span class="hl-1"> </span><span class="hl-9">&#39;three&#39;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Raycaster</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 只捕获第一个焦点 (性能优化)</span><br/><span class="hl-8"> * - true: 找到第一个交点后立即停止检测,返回结果。</span><br/><span class="hl-8"> * - false (默认): 检测所有可能的交点。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">firstHitOnly</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 自定义交点过滤器</span><br/><span class="hl-8"> * - 回调函数,返回 boolean。</span><br/><span class="hl-8"> * - true: 保留该交点。</span><br/><span class="hl-8"> * - false: 丢弃该交点。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">hitFilter</span><span class="hl-1">?: (</span><span class="hl-6">intersect</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Intersection</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 是否由近及远排序</span><br/><span class="hl-8"> * - true (默认): 返回的结果数组按距离摄像机从近到远排序。</span><br/><span class="hl-8"> * - false: 结果顺序不确定(通常按遍历顺序)。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">sortByDistance</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 作用楼层 (Five 特有逻辑)</span><br/><span class="hl-8"> * - 用于多楼层场景过滤。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">floorIndex</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
13
+ <pre><code class="typescript"><span class="hl-8">// defined in five/declare.d.ts</span><br/><span class="hl-3">declare</span><span class="hl-1"> </span><span class="hl-3">module</span><span class="hl-1"> </span><span class="hl-9">&#39;three&#39;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Raycaster</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 只捕获第一个焦点 (性能优化)</span><br/><span class="hl-8"> * - true: 找到第一个交点后立即停止检测,返回结果。</span><br/><span class="hl-8"> * - false (默认): 检测所有可能的交点。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">firstHitOnly</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 自定义交点过滤器</span><br/><span class="hl-8"> * - 回调函数,返回 boolean。</span><br/><span class="hl-8"> * - true: 保留该交点。</span><br/><span class="hl-8"> * - false: 丢弃该交点。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">hitFilter</span><span class="hl-1">?: (</span><span class="hl-6">intersect</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Intersection</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 是否由近及远排序</span><br/><span class="hl-8"> * - true (默认): 返回的结果数组按距离摄像机从近到远排序。</span><br/><span class="hl-8"> * - false: 结果顺序不确定(通常按遍历顺序)。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">sortByDistance</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">;</span><br/><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 作用楼层 (Five 特有逻辑)</span><br/><span class="hl-8"> * - 用于多楼层场景过滤。</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-6">floorIndex</span><span class="hl-1">?: </span><span class="hl-7">number</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><br/><span class="hl-1"> </span><span class="hl-10">export</span><span class="hl-1"> </span><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Intersection</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/** 命中的具体 Tile 对象 (仅 3DTiles) */</span><br/><span class="hl-1"> </span><span class="hl-6">tile</span><span class="hl-1">?: </span><span class="hl-7">Tile</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 命中的 ViewLayer 对象 */</span><br/><span class="hl-1"> </span><span class="hl-6">viewLayer</span><span class="hl-1">?: </span><span class="hl-7">ViewLayer</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-8">/** 命中的 Model 对象 */</span><br/><span class="hl-1"> </span><span class="hl-6">model</span><span class="hl-1">?: </span><span class="hl-7">Model</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
11
14
  </code><button type="button">Copy</button></pre>
12
15
 
13
16
  <h2 id="concepts" class="tsd-anchor-link">Concepts<a href="#concepts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
@@ -86,10 +89,13 @@
86
89
  </ol>
87
90
  <h2 id="related" class="tsd-anchor-link">Related<a href="#related" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
88
91
  <ul>
89
- <li><a href="features_parameter.html">parameter.md</a>: 了解模型参数配置。</li>
92
+ <li><a href="features_parameter.html">Parameter</a>: 了解模型参数配置。</li>
93
+ <li><a href="features_screen-project.html">Screen Project</a>: 屏幕坐标与空间坐标转换(标签、拾取的前置步骤)。</li>
94
+ <li><a href="features_event.html">Event</a>: 手势事件系统,获取点击坐标的来源。</li>
95
+ <li><a href="features_coordinate-system.html">Coordinate System</a>: 坐标系定义,理解 NDC 与世界坐标。</li>
90
96
  </ul>
91
97
  <hr>
92
- <pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">raycast</span><span class="hl-1">, </span><span class="hl-2">bvh</span><span class="hl-1">, </span><span class="hl-2">interaction</span><span class="hl-1">, </span><span class="hl-2">performance</span><span class="hl-1">]</span>
98
+ <pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">点击</span><span class="hl-1">, </span><span class="hl-2">拾取</span><span class="hl-1">, </span><span class="hl-2">碰撞检测</span><span class="hl-1">, </span><span class="hl-2">物体选择</span><span class="hl-1">, </span><span class="hl-2">raycast</span><span class="hl-1">, </span><span class="hl-2">bvh</span><span class="hl-1">, </span><span class="hl-2">interaction</span><span class="hl-1">, </span><span class="hl-2">performance</span><span class="hl-1">, </span><span class="hl-2">picking</span><span class="hl-1">, </span><span class="hl-2">hit-test</span><span class="hl-1">, </span><span class="hl-2">click</span><span class="hl-1">, </span><span class="hl-2">floor-detection</span><span class="hl-1">]</span>
93
99
  </code><button type="button">Copy</button></pre>
94
100
 
95
101
  </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#raycast-射线检测"><span>Raycast (射线检测)</span></a><ul><li><a href="#schema-threejs-raycaster-extensions"><span>Schema: <wbr/>Three.js <wbr/>Raycaster <wbr/>Extensions</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#1-five-内置-bvh-bounding-volume-hierarchy"><span>1. <wbr/>Five 内置 <wbr/>BVH (<wbr/>Bounding <wbr/>Volume <wbr/>Hierarchy)</span></a></li><li><a href="#2-modelsintersectraycaster-modelintersectraycaster-vs-原生-intersectobject"><span>2. models.intersect<wbr/>Raycaster / model.intersect<wbr/>Raycaster vs 原生 intersect<wbr/>Object</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#基础用法:检测点击位置"><span>基础用法:检测点击位置</span></a></li><li><a href="#性能优化:只获取第一个交点"><span>性能优化:只获取第一个交点</span></a></li><li><a href="#高级用法:使用过滤器"><span>高级用法:使用过滤器</span></a></li></ul></li><li><a href="#debugging"><span>Debugging</span></a></li><li><a href="#common-pitfalls"><span>Common <wbr/>Pitfalls</span></a></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -7,6 +7,9 @@
7
7
  <li><strong>Examples</strong>: CDN 替换、私有化部署鉴权、调试模式。</li>
8
8
  </ul>
9
9
  <h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
10
+ <blockquote>
11
+ <p><strong>Definition</strong>: <a href="../../five/application/fiveInitArgs.d.ts">FiveInitArgs</a></p>
12
+ </blockquote>
10
13
  <pre><code class="typescript"><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">FiveInitArgs</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 请求代理函数</span><br/><span class="hl-8"> * </span><span class="hl-3">@description</span><span class="hl-8"> 在 Five 内部发起任何网络请求(如加载图片、模型、配置)之前调用。</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">url</span><span class="hl-8"> - 原始请求 URL</span><br/><span class="hl-8"> * </span><span class="hl-3">@returns</span><span class="hl-8"> 修改后的 URL (string) 或异步返回修改后的 URL (Promise&lt;string&gt;)</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">requestProxy</span><span class="hl-1">?: (</span><span class="hl-6">url</span><span class="hl-1">: </span><span class="hl-7">string</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">string</span><span class="hl-1"> | </span><span class="hl-7">Promise</span><span class="hl-1">&lt;</span><span class="hl-7">string</span><span class="hl-1">&gt;;</span><br/><span class="hl-1">}</span>
11
14
  </code><button type="button">Copy</button></pre>
12
15
 
@@ -69,7 +72,7 @@
69
72
  <li><a href="features_load-external-model.html">Load External Model</a>: 加载外部模型时也会触发 requestProxy。</li>
70
73
  </ul>
71
74
  <hr>
72
- <pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">configuration</span><span class="hl-1">, </span><span class="hl-2">network</span><span class="hl-1">, </span><span class="hl-2">proxy</span><span class="hl-1">, </span><span class="hl-2">authentication</span><span class="hl-1">]</span>
75
+ <pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">请求代理</span><span class="hl-1">, </span><span class="hl-2">鉴权</span><span class="hl-1">, </span><span class="hl-2">域名替换</span><span class="hl-1">, </span><span class="hl-2">私有化</span><span class="hl-1">, </span><span class="hl-2">请求拦截</span><span class="hl-1">, </span><span class="hl-2">configuration</span><span class="hl-1">, </span><span class="hl-2">network</span><span class="hl-1">, </span><span class="hl-2">proxy</span><span class="hl-1">, </span><span class="hl-2">authentication</span><span class="hl-1">, </span><span class="hl-2">CDN</span><span class="hl-1">, </span><span class="hl-2">token</span><span class="hl-1">, </span><span class="hl-2">url-rewrite</span><span class="hl-1">, </span><span class="hl-2">cors</span><span class="hl-1">]</span>
73
76
  </code><button type="button">Copy</button></pre>
74
77
 
75
78
  </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#request-proxy-请求代理"><span>Request <wbr/>Proxy (请求代理)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#拦截时机"><span>拦截时机</span></a></li><li><a href="#核心用途"><span>核心用途</span></a></li></ul></li><li><a href="#configuration"><span>Configuration</span></a></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#1-基础用法:cdn-域名替换"><span>1. 基础用法:<wbr/>CDN 域名替换</span></a></li><li><a href="#2-进阶用法:异步鉴权-async-auth"><span>2. 进阶用法:异步鉴权 (<wbr/>Async <wbr/>Auth)</span></a></li><li><a href="#3-开发调试:本地资源代理"><span>3. 开发调试:本地资源代理</span></a></li></ul></li><li><a href="#common-pitfalls"><span>Common <wbr/>Pitfalls</span></a></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -6,6 +6,9 @@
6
6
  <li><strong>Examples</strong>: 空间点位转屏幕坐标 (标签功能)、屏幕坐标转空间射线。</li>
7
7
  </ul>
8
8
  <h2 id="schema" class="tsd-anchor-link">Schema<a href="#schema" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2>
9
+ <blockquote>
10
+ <p><strong>Definition</strong>: <a href="../../five/application/five.d.ts">Five</a></p>
11
+ </blockquote>
9
12
  <pre><code class="typescript"><span class="hl-8">// defined in Five class</span><br/><span class="hl-3">interface</span><span class="hl-1"> </span><span class="hl-7">Five</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-8">/**</span><br/><span class="hl-8"> * 计算三维坐标对应到屏幕的二维坐标</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">vector</span><span class="hl-8"> - 三维空间坐标 (World Space)</span><br/><span class="hl-8"> * </span><span class="hl-3">@param</span><span class="hl-8"> </span><span class="hl-6">testModel</span><span class="hl-8"> - 是否进行模型遮挡检测 (默认 false)。如果为 true,且该点被模型遮挡,则返回 null。</span><br/><span class="hl-8"> * </span><span class="hl-3">@returns</span><span class="hl-8"> 二维屏幕坐标 (相对于 Canvas 左上角) 或 null (如果点在视野外或被遮挡)</span><br/><span class="hl-8"> */</span><br/><span class="hl-1"> </span><span class="hl-5">project2d</span><span class="hl-1">(</span><span class="hl-6">vector</span><span class="hl-1">: </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Vector3</span><span class="hl-1">, </span><span class="hl-6">testModel</span><span class="hl-1">?: </span><span class="hl-7">boolean</span><span class="hl-1">): </span><span class="hl-7">THREE</span><span class="hl-1">.</span><span class="hl-7">Vector2</span><span class="hl-1"> | </span><span class="hl-7">null</span><span class="hl-1">;</span><br/><span class="hl-1">}</span>
10
13
  </code><button type="button">Copy</button></pre>
11
14
 
@@ -101,9 +104,10 @@
101
104
  <li><a href="features_raycast.html">Raycast</a>: 详细的射线检测文档。</li>
102
105
  <li><a href="features_five.html">Five</a>: Five 核心类说明。</li>
103
106
  <li><a href="features_state.html">State</a>: 了解相机位姿 (Pose)。</li>
107
+ <li><a href="features_coordinate-system.html">Coordinate System</a>: 坐标系定义,理解世界坐标与屏幕坐标的关系。</li>
104
108
  </ul>
105
109
  <hr>
106
- <pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">coordinate</span><span class="hl-1">, </span><span class="hl-2">screen</span><span class="hl-1">, </span><span class="hl-2">project</span><span class="hl-1">, </span><span class="hl-2">label</span><span class="hl-1">, </span><span class="hl-2">ui</span><span class="hl-1">]</span>
110
+ <pre><code class="yaml"><span class="hl-0">tags</span><span class="hl-1">: [</span><span class="hl-2">标签</span><span class="hl-1">, </span><span class="hl-2">坐标转换</span><span class="hl-1">, </span><span class="hl-2">信息面板</span><span class="hl-1">, </span><span class="hl-2">coordinate</span><span class="hl-1">, </span><span class="hl-2">screen</span><span class="hl-1">, </span><span class="hl-2">project</span><span class="hl-1">, </span><span class="hl-2">label</span><span class="hl-1">, </span><span class="hl-2">ui</span><span class="hl-1">, </span><span class="hl-2">tag</span><span class="hl-1">, </span><span class="hl-2">HUD</span><span class="hl-1">, </span><span class="hl-2">3D转2D</span><span class="hl-1">, </span><span class="hl-2">overlay</span><span class="hl-1">, </span><span class="hl-2">tooltip</span><span class="hl-1">]</span>
107
111
  </code><button type="button">Copy</button></pre>
108
112
 
109
113
  </div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#screen-space-projection-屏幕与空间坐标转换"><span>Screen &amp; <wbr/>Space <wbr/>Projection (屏幕与空间坐标转换)</span></a><ul><li><a href="#schema"><span>Schema</span></a></li><li><a href="#concepts"><span>Concepts</span></a></li><li><ul><li><a href="#1-坐标系转换流程"><span>1. 坐标系转换流程</span></a></li><li><a href="#2-转换关系"><span>2. 转换关系</span></a></li><li><a href="#3-fiveproject2d"><span>3. five.project2d</span></a></li></ul></li><li><a href="#examples"><span>Examples</span></a></li><li><ul><li><a href="#1-空间标签-3d-point-to-dom-label"><span>1. 空间标签 (3<wbr/>D <wbr/>Point to <wbr/>DOM <wbr/>Label)</span></a></li><li><a href="#2-屏幕点击转射线-screen-to-ray"><span>2. 屏幕点击转射线 (<wbr/>Screen to <wbr/>Ray)</span></a></li></ul></li><li><a href="#common-pitfalls"><span>Common <wbr/>Pitfalls</span></a></li><li><a href="#related"><span>Related</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">如视 Five SDK</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>