@realsee/five-webgpu 1.0.0-alpha.1 → 1.0.0-alpha.10

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 (628) hide show
  1. package/README.md +9 -9
  2. package/_virtual/_rolldown/runtime.js +255 -0
  3. package/ai_guides/README.md +2 -2
  4. package/ai_guides/api.md +9 -8
  5. package/ai_guides/features/camera-animation.md +1 -1
  6. package/ai_guides/features/clipper.md +1 -1
  7. package/ai_guides/features/coordinate-system.md +1 -1
  8. package/ai_guides/features/event.md +1 -2
  9. package/ai_guides/features/five.md +81 -12
  10. package/ai_guides/features/gesture.md +3 -3
  11. package/ai_guides/features/get-screen-pixels.md +1 -1
  12. package/ai_guides/features/image-options.md +3 -3
  13. package/ai_guides/features/load-external-model.md +15 -15
  14. package/ai_guides/features/load-progress.md +2 -2
  15. package/ai_guides/features/material.md +35 -8
  16. package/ai_guides/features/mode.md +28 -31
  17. package/ai_guides/features/model.md +1 -1
  18. package/ai_guides/features/pano-filter.md +3 -3
  19. package/ai_guides/features/pano-tile.md +2 -2
  20. package/ai_guides/features/raycast.md +1 -1
  21. package/ai_guides/features/screen-project.md +1 -1
  22. package/ai_guides/features/state.md +3 -3
  23. package/ai_guides/features/ultra-hdr.md +41 -32
  24. package/ai_guides/features/work.md +2 -2
  25. package/ai_guides/quick-start.md +3 -3
  26. package/ai_guides/release_notes/6.6.md +2 -2
  27. package/ai_guides/release_notes/6.7.md +1 -1
  28. package/ai_guides/release_notes/6.8.md +3 -3
  29. package/ai_guides/support.md +0 -4
  30. package/docs/assets/hierarchy.js +1 -1
  31. package/docs/assets/navigation.js +1 -1
  32. package/docs/assets/search.js +1 -1
  33. package/docs/classes/index.AdaptiveLuminancePass.html +1 -1
  34. package/docs/classes/index.BoundingMesh.html +1 -1
  35. package/docs/classes/index.Camera.html +1 -1
  36. package/docs/classes/index.EffectComposer.html +1 -1
  37. package/docs/classes/index.EyeDomeLightingPass.html +1 -1
  38. package/docs/classes/index.Five.html +77 -68
  39. package/docs/classes/index.FivePass.html +1 -1
  40. package/docs/classes/index.FiveRenderer.html +2 -2
  41. package/docs/classes/index.FlowingFireworks3DPass.html +7 -3
  42. package/docs/classes/index.FlowingLight2DPass.html +6 -3
  43. package/docs/classes/index.FlowingLight3DPass.html +6 -3
  44. package/docs/classes/index.GaussianBlurPass.html +1 -1
  45. package/docs/classes/index.InternalWebGPURenderer.html +17 -3
  46. package/docs/classes/index.Model.html +1 -1
  47. package/docs/classes/index.ModelScene.html +1 -1
  48. package/docs/classes/index.NetworkSubscribe.html +1 -1
  49. package/docs/classes/index.PBMCustomNode.html +57 -0
  50. package/docs/classes/index.PBMGaussianSplattingNodeMaterial.html +9 -6
  51. package/docs/classes/index.PBMGaussianSplattingObject.html +18 -4
  52. package/docs/classes/index.PBMGaussianSplattingRenderMesh.html +41 -11
  53. package/docs/classes/index.PBMGroup.html +1 -1
  54. package/docs/classes/index.PBMMesh.html +1 -1
  55. package/docs/classes/index.PBMMeshBasicMaterial.html +19 -6
  56. package/docs/classes/index.PBMMeshBasicNodeMaterial.html +31 -8
  57. package/docs/classes/index.PBMMeshPanoOnlyMaterial.html +19 -6
  58. package/docs/classes/index.PBMMeshPanoOnlyNodeMaterial.html +31 -8
  59. package/docs/classes/index.PBMMeshPhongMaterial.html +19 -6
  60. package/docs/classes/index.PBMMeshPhongNodeMaterial.html +31 -8
  61. package/docs/classes/index.PBMMeshPhysicalMaterial.html +19 -6
  62. package/docs/classes/index.PBMMeshPhysicalNodeMaterial.html +31 -8
  63. package/docs/classes/index.PBMPanoFilter.html +8 -8
  64. package/docs/classes/index.PBMPointCloud.html +6 -7
  65. package/docs/classes/index.PBMPointCloudMaterial.html +83 -0
  66. package/docs/classes/index.PBMSkinnedMesh.html +1 -1
  67. package/docs/classes/index.PBMUpdateable.html +1 -1
  68. package/docs/classes/index.PanoCircleMesh.html +1 -1
  69. package/docs/classes/index.PanoCircleMeshCustom.html +5 -5
  70. package/docs/classes/index.PanoCircleMeshSolid.html +1 -1
  71. package/docs/classes/index.Parameter.html +61 -53
  72. package/docs/classes/index.Scene.html +1 -1
  73. package/docs/classes/index.Subscribe.html +1 -1
  74. package/docs/classes/index.TextureLoader.html +4 -1
  75. package/docs/classes/index.Tile3D.html +23 -21
  76. package/docs/classes/index.TileNode.html +1 -1
  77. package/docs/classes/index.Tileset.html +4 -4
  78. package/docs/classes/index.TrajectoryNode.html +3 -3
  79. package/docs/classes/index.Work.html +20 -18
  80. package/docs/classes/index.WorkResolvedObserver.html +22 -22
  81. package/docs/classes/index.XRButton.html +3 -0
  82. package/docs/documents/README.html +2 -2
  83. package/docs/documents/api.html +11 -10
  84. package/docs/documents/features_camera-animation.html +1 -1
  85. package/docs/documents/features_clipper.html +1 -1
  86. package/docs/documents/features_coordinate-system.html +1 -1
  87. package/docs/documents/features_event.html +1 -2
  88. package/docs/documents/features_five.html +53 -11
  89. package/docs/documents/features_gesture.html +3 -3
  90. package/docs/documents/features_get-screen-pixels.html +1 -1
  91. package/docs/documents/features_image-options.html +3 -3
  92. package/docs/documents/features_load-external-model.html +13 -13
  93. package/docs/documents/features_load-progress.html +1 -1
  94. package/docs/documents/features_material.html +20 -9
  95. package/docs/documents/features_mode.html +30 -15
  96. package/docs/documents/features_model.html +1 -1
  97. package/docs/documents/features_pano-filter.html +3 -3
  98. package/docs/documents/features_pano-tile.html +2 -2
  99. package/docs/documents/features_raycast.html +1 -1
  100. package/docs/documents/features_screen-project.html +1 -1
  101. package/docs/documents/features_state.html +2 -2
  102. package/docs/documents/features_ultra-hdr.html +50 -44
  103. package/docs/documents/features_work.html +2 -2
  104. package/docs/documents/quick-start.html +2 -2
  105. package/docs/documents/release_notes_6.6.html +2 -2
  106. package/docs/documents/release_notes_6.7.html +1 -1
  107. package/docs/documents/release_notes_6.8.html +3 -3
  108. package/docs/documents/support.html +1 -3
  109. package/docs/functions/index.customNodesCacheKey.html +3 -0
  110. package/docs/functions/index.parseWork.html +1 -1
  111. package/docs/functions/index.workToJson.html +1 -1
  112. package/docs/hierarchy.html +1 -1
  113. package/docs/index.html +2 -2
  114. package/docs/interfaces/index.AddableObject.html +1 -1
  115. package/docs/interfaces/index.AjaxOptions.html +1 -1
  116. package/docs/interfaces/index.BaseEvent.html +2 -2
  117. package/docs/interfaces/index.Clock.html +24 -0
  118. package/docs/interfaces/index.DeviceProfile.html +8 -0
  119. package/docs/interfaces/index.EventCallback.html +49 -47
  120. package/docs/interfaces/index.FiveInitArgs.html +65 -41
  121. package/docs/interfaces/index.GainmapCfgData.html +15 -0
  122. package/docs/interfaces/index.GestureEvent.html +2 -2
  123. package/docs/interfaces/index.IPBMMaterial.html +18 -5
  124. package/docs/interfaces/index.ImageOptions.html +1 -1
  125. package/docs/interfaces/index.IntersectEvent.html +2 -2
  126. package/docs/interfaces/index.IntersectMesh.html +1 -1
  127. package/docs/interfaces/index.IntersectMeshInterface.html +1 -1
  128. package/docs/interfaces/index.Intersection.html +1 -1
  129. package/docs/interfaces/index.LoosePanoWork.html +2 -2
  130. package/docs/interfaces/index.LooseWork.html +2 -2
  131. package/docs/interfaces/index.LooseWorkInitial.html +2 -2
  132. package/docs/interfaces/index.LooseWorkModel.html +2 -2
  133. package/docs/interfaces/index.LooseWorkObserver.html +2 -2
  134. package/docs/interfaces/index.LooseWorkPanorama.html +4 -3
  135. package/docs/interfaces/index.LooseWorkWithExtrinsics.html +15 -9
  136. package/docs/interfaces/index.ModeChangeEvent.html +2 -2
  137. package/docs/interfaces/index.ModelControllerCustomInitArgs.html +1 -1
  138. package/docs/interfaces/index.ModelEvent.html +2 -2
  139. package/docs/interfaces/index.ModelSceneEvent.html +2 -2
  140. package/docs/interfaces/index.ModelTileEvent.html +2 -2
  141. package/docs/interfaces/index.MovePanoOptions.html +1 -1
  142. package/docs/interfaces/index.NetworkAbortError.html +1 -1
  143. package/docs/interfaces/index.NetworkFirbiddenError.html +1 -1
  144. package/docs/interfaces/index.NetworkOptions.html +1 -1
  145. package/docs/interfaces/index.NetworkProxyError.html +1 -1
  146. package/docs/interfaces/index.NetworkResourceEvent.html +2 -2
  147. package/docs/interfaces/index.NetworkResponseError.html +1 -1
  148. package/docs/interfaces/index.NetworkTimeoutError.html +1 -1
  149. package/docs/interfaces/index.ObjectEvent.html +2 -2
  150. package/docs/interfaces/index.PBMClipperParameter.html +2 -2
  151. package/docs/interfaces/index.PBMCustomNodeContext.html +87 -0
  152. package/docs/interfaces/index.PBMCustomNodeOptions.html +10 -0
  153. package/docs/interfaces/index.PBMCustomNodePanoContext.html +20 -0
  154. package/docs/interfaces/index.PBMCustomNodeSlots.html +31 -0
  155. package/docs/interfaces/index.PBMGaussianSplattingNodeMaterialOptions.html +4 -0
  156. package/docs/interfaces/index.PBMPanoDepth.html +5 -5
  157. package/docs/interfaces/index.PBMPanoFilterValue.html +2 -2
  158. package/docs/interfaces/index.PBMPanoGainmap.html +6 -0
  159. package/docs/interfaces/index.PBMPanoPicture.html +9 -8
  160. package/docs/interfaces/index.PBMRefinedScreen.html +2 -2
  161. package/docs/interfaces/index.PanoCircleMeshCustomOptions.html +2 -2
  162. package/docs/interfaces/index.PanoCircleMeshInterface.html +1 -1
  163. package/docs/interfaces/index.PanoEvent.html +2 -2
  164. package/docs/interfaces/index.PanoPrepareEvent.html +15 -0
  165. package/docs/interfaces/index.PanoTextureEvent.html +2 -2
  166. package/docs/interfaces/index.PanoramaControllerCustomInitArgs.html +9 -9
  167. package/docs/interfaces/index.PanoramaLikeControllerCustomInitArgs.html +1 -1
  168. package/docs/interfaces/index.ParameterMaterialValue.html +46 -38
  169. package/docs/interfaces/index.ParameterTilesetValue.html +15 -15
  170. package/docs/interfaces/index.ParameterValue.html +60 -52
  171. package/docs/interfaces/index.Pose.html +1 -1
  172. package/docs/interfaces/index.RenderEvent.html +2 -2
  173. package/docs/interfaces/index.ResolvedParameterValue.html +60 -52
  174. package/docs/interfaces/index.SplatData.html +10 -5
  175. package/docs/interfaces/index.State.html +1 -1
  176. package/docs/interfaces/index.StateEvent.html +2 -2
  177. package/docs/interfaces/index.TextureOptions.html +1 -1
  178. package/docs/interfaces/index.TilesetOptions.html +7 -2
  179. package/docs/interfaces/index.TopviewControllerCustomInitArgs.html +1 -1
  180. package/docs/interfaces/index.VRPanoramaControllerCustomInitArgs.html +37 -0
  181. package/docs/interfaces/index.ViewLayer.html +23 -21
  182. package/docs/interfaces/index.WorkCubeHdrGainmapImage.html +10 -0
  183. package/docs/interfaces/index.WorkCubeImage.html +5 -9
  184. package/docs/interfaces/index.WorkImage.html +8 -12
  185. package/docs/interfaces/index.WorkInitial.html +8 -8
  186. package/docs/interfaces/index.WorkModel.html +8 -8
  187. package/docs/interfaces/index.WorkModelLayer.html +6 -6
  188. package/docs/interfaces/index.WorkObserver.html +23 -23
  189. package/docs/interfaces/index.WorkPanoramaJson.html +3 -2
  190. package/docs/interfaces/index.WorkTile.html +8 -12
  191. package/docs/interfaces/index.WorksEvent.html +2 -2
  192. package/docs/interfaces/index.XRControllerEvent.html +2 -2
  193. package/docs/interfaces/index.XRGestureEvent.html +2 -2
  194. package/docs/interfaces/index.XRPanoramaControllerCustomInitArgs.html +52 -0
  195. package/docs/interfaces/index.XRSessionEvent.html +2 -2
  196. package/docs/modules/index.html +1 -1
  197. package/docs/types/index.ControllerCustomInitTypes.html +4 -2
  198. package/docs/types/index.ControllerEventTypes.html +25 -23
  199. package/docs/types/index.DeviceProfileOverride.html +5 -0
  200. package/docs/types/index.EventTypes.html +26 -26
  201. package/docs/types/index.FlowingFireworks3DPassLine.html +5 -2
  202. package/docs/types/index.FlowingLight2DPassLine.html +4 -2
  203. package/docs/types/index.FlowingLight3DPassLine.html +7 -2
  204. package/docs/types/index.FlowingLightLineInput.html +12 -0
  205. package/docs/types/index.Mode.html +6 -3
  206. package/docs/types/index.OutputTextureDataType.html +1 -1
  207. package/docs/types/index.PBMColorStyle.html +1 -1
  208. package/docs/types/index.PBMCustomNodeTargetType.html +2 -0
  209. package/docs/types/index.PBMPointBack.html +1 -1
  210. package/docs/types/index.PBMPointShape.html +1 -1
  211. package/docs/types/index.PBMPointSize.html +1 -1
  212. package/docs/types/index.PBMRoofStyle.html +6 -0
  213. package/docs/types/index.ParseOptions.html +14 -8
  214. package/docs/types/index.XRMachineType.html +7 -0
  215. package/docs/variables/index.GSPLAT_PIPELINE_AUTO.html +2 -0
  216. package/docs/variables/index.GSPLAT_PIPELINE_RASTER_CPU_SORT.html +2 -0
  217. package/docs/variables/index.GSPLAT_PIPELINE_RASTER_GPU_SORT.html +2 -0
  218. package/docs/variables/index.PBMVertexMarkFlag.html +4 -0
  219. package/docs/variables/index.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
  220. package/docs/variables/index.controllersDefaultInitArgs.html +1 -1
  221. package/five/application/controllers.d.ts +8 -0
  222. package/five/application/events.d.ts +1 -1
  223. package/five/application/five.d.ts +15 -1
  224. package/five/application/fiveInitArgs.d.ts +32 -1
  225. package/five/application/mode.d.ts +8 -1
  226. package/five/cardboard/helper.d.ts +2 -0
  227. package/five/cardboard/index.d.ts +13 -0
  228. package/five/cardboard/sensor.d.ts +158 -0
  229. package/five/controllers/base.d.ts +3 -0
  230. package/five/controllers/events.d.ts +5 -3
  231. package/five/controllers/panorama.d.ts +2 -2
  232. package/five/controllers/vrPanorama.d.ts +56 -0
  233. package/five/controllers/xrPanorama.d.ts +506 -0
  234. package/five/core/internalWebGPURenderer.d.ts +23 -1
  235. package/five/core/panoVideo.d.ts +4 -1
  236. package/five/core/tiling.d.ts +40 -9
  237. package/five/core/webglAsyncReadFix.d.ts +25 -0
  238. package/five/gaussian-splatting/gpu-sort/prefixSumKernel.d.ts +65 -0
  239. package/five/gaussian-splatting/gpu-sort/radixSortModule.d.ts +128 -0
  240. package/five/gaussian-splatting/gpu-sort/shaders/radixHistogram.d.ts +2 -0
  241. package/five/gaussian-splatting/gpu-sort/shaders/radixReorder.d.ts +2 -0
  242. package/five/gaussian-splatting/gpu-sort/shaders/sortKeygen.d.ts +2 -0
  243. package/five/gaussian-splatting/gpu-sort/sortAdapter.d.ts +234 -0
  244. package/five/gaussian-splatting/layerRegistry.d.ts +17 -0
  245. package/five/gaussian-splatting/pipelines/cpuSortPipeline.d.ts +159 -0
  246. package/five/gaussian-splatting/pipelines/gpuSortPipeline.d.ts +98 -0
  247. package/five/gaussian-splatting/pipelines/gsplatPipeline.d.ts +104 -0
  248. package/five/gaussian-splatting/pipelines/pipelineMode.d.ts +42 -0
  249. package/five/gaussian-splatting/pipelines/sortThrottle.d.ts +45 -0
  250. package/five/gaussian-splatting/shStore.d.ts +22 -0
  251. package/five/gaussian-splatting/splatAssembler.d.ts +69 -0
  252. package/five/gaussian-splatting/transformStore.d.ts +37 -0
  253. package/five/gaussian-splatting/wasm/sort.d.ts +4 -3
  254. package/five/index.d.ts +8 -2
  255. package/five/index.js +403 -343
  256. package/five/index.mjs +9531 -4900
  257. package/five/meshes/panoCircleMeshCustom.d.ts +1 -0
  258. package/five/model/index.d.ts +3 -2
  259. package/five/model/loaders/spz.d.ts +50 -2
  260. package/five/model/materials/nodes/pbmMeshBasicNodeMaterial.d.ts +2 -0
  261. package/five/model/materials/nodes/pbmMeshPanoOnlyNodeMaterial.d.ts +2 -0
  262. package/five/model/materials/nodes/pbmMeshPhongNodeMaterial.d.ts +2 -0
  263. package/five/model/materials/nodes/pbmMeshPhysicalNodeMaterial.d.ts +2 -0
  264. package/five/model/materials/pbmGaussianSplattingNodeMaterial.d.ts +12 -5
  265. package/five/model/materials/pbmMaterial.d.ts +288 -6
  266. package/five/model/materials/pbmMeshMaterial.d.ts +0 -9
  267. package/five/model/materials/pbmPointCloudNodeMaterial.d.ts +1 -1
  268. package/five/model/materials/tsl/defines.d.ts +8 -2
  269. package/five/model/materials/tsl/outputBuilder.d.ts +8 -15
  270. package/five/model/materials/tsl/panoColor.d.ts +8 -2
  271. package/five/model/materials/tsl/utils.d.ts +13 -0
  272. package/five/model/objects/pbmGaussianSplattingObject.d.ts +30 -4
  273. package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +113 -48
  274. package/five/model/objects/pbmPointCloud.d.ts +0 -1
  275. package/five/model/objects/pbmPointCloudObject.d.ts +1 -1
  276. package/five/model/parameter.d.ts +20 -5
  277. package/five/model/tile3d/index.d.ts +2 -0
  278. package/five/model/tile3d/tileset.d.ts +5 -0
  279. package/five/model/tile3d/trajectory-content.d.ts +53 -0
  280. package/five/renderer/compute-renderers/binned/binned-core.d.ts +46 -0
  281. package/five/renderer/compute-renderers/binned/binned-pipelines.d.ts +10 -0
  282. package/five/renderer/compute-renderers/binned/shaders/args-builder.d.ts +2 -0
  283. package/five/renderer/compute-renderers/binned/shaders/classify.d.ts +2 -0
  284. package/five/renderer/compute-renderers/binned/shaders/coop.d.ts +2 -0
  285. package/five/renderer/compute-renderers/pointcloud-compute-renderer.d.ts +14 -38
  286. package/five/renderer/compute-renderers/shaders/lib/color.d.ts +2 -0
  287. package/five/renderer/compute-renderers/shaders/lib/cull.d.ts +2 -0
  288. package/five/renderer/compute-renderers/shaders/lib/encode.d.ts +2 -0
  289. package/five/renderer/compute-renderers/shaders/lib/point-setup.d.ts +2 -0
  290. package/five/renderer/compute-renderers/shaders/lib/point-size.d.ts +2 -0
  291. package/five/renderer/compute-renderers/shaders/lib/raster.d.ts +2 -0
  292. package/five/renderer/compute-renderers/shaders/lib/size-class.d.ts +2 -0
  293. package/five/renderer/compute-renderers/shaders/lib/tile-bindings.d.ts +2 -0
  294. package/five/renderer/compute-renderers/uniform-layout.d.ts +23 -0
  295. package/five/renderer/five-renderer.d.ts +2 -0
  296. package/five/renderer/index.d.ts +1 -1
  297. package/five/renderer/postprocessing/index.d.ts +1 -1
  298. package/five/renderer/postprocessing/passes/flowing-fireworks-3d-pass.d.ts +23 -0
  299. package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +2 -0
  300. package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +23 -0
  301. package/five/renderer/postprocessing/passes/pass.js +255 -0
  302. package/five/renderer/postprocessing/passes/pass.mjs +255 -0
  303. package/five/renderer/tools/full-screen-quad.js +255 -0
  304. package/five/renderer/tools/full-screen-quad.mjs +255 -0
  305. package/five/texture/loader.d.ts +6 -0
  306. package/five/types/cube.d.ts +0 -1
  307. package/five/utils/calculateThreeMouse.js +255 -0
  308. package/five/utils/calculateThreeMouse.mjs +255 -0
  309. package/five/utils/detector.d.ts +11 -1
  310. package/five/utils/distance.js +255 -0
  311. package/five/utils/distance.mjs +255 -0
  312. package/five/utils/error.d.ts +1 -0
  313. package/five/utils/event.d.ts +26 -3
  314. package/five/utils/gainmap-data.d.ts +23 -0
  315. package/five/utils/isNil.js +255 -0
  316. package/five/utils/isNil.mjs +255 -0
  317. package/five/utils/ktx2.d.ts +3 -3
  318. package/five/utils/uuid.js +255 -0
  319. package/five/utils/uuid.mjs +255 -0
  320. package/five/webxr/XRControllerModelFactory.d.ts +55 -0
  321. package/five/webxr/buttonStateMachine.d.ts +31 -0
  322. package/five/webxr/deviceProfile.d.ts +70 -0
  323. package/five/webxr/inputSourceTracker.d.ts +59 -0
  324. package/five/webxr/referenceSpace.d.ts +60 -0
  325. package/five/webxr/renderTargetBridge.d.ts +45 -0
  326. package/five/webxr/xrButton.d.ts +4 -0
  327. package/five/webxr/xrManager.d.ts +174 -0
  328. package/five/work/index.d.ts +1 -1
  329. package/five/work/looseWorkType.d.ts +2 -1
  330. package/five/work/work.d.ts +30 -7
  331. package/five/work/workJsonType.d.ts +2 -1
  332. package/gltf-loader/gltf-object.d.ts +17 -0
  333. package/gltf-loader/index.d.ts +45 -0
  334. package/gltf-loader/index.js +255 -0
  335. package/gltf-loader/index.mjs +302 -0
  336. package/line/circle_png.d.ts +1 -0
  337. package/line/index.d.ts +49 -0
  338. package/line/index.js +255 -0
  339. package/line/index.mjs +340 -0
  340. package/llms.txt +1 -1
  341. package/package.json +34 -5
  342. package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
  343. package/plugins/BackgroundPlugin/Controller.js +276 -0
  344. package/plugins/BackgroundPlugin/Controller.mjs +276 -0
  345. package/plugins/BackgroundPlugin/index.d.ts +5 -0
  346. package/plugins/BackgroundPlugin/index.js +255 -0
  347. package/plugins/BackgroundPlugin/index.mjs +255 -0
  348. package/plugins/BackgroundPlugin/typings.d.ts +44 -0
  349. package/plugins/BasePlugin/index.d.ts +1 -1
  350. package/plugins/BasePlugin/index.js +255 -0
  351. package/plugins/BasePlugin/index.mjs +255 -0
  352. package/plugins/CSS2DPlugin/Controller.d.ts +59 -0
  353. package/plugins/CSS2DPlugin/Controller.js +255 -0
  354. package/plugins/CSS2DPlugin/Controller.mjs +255 -0
  355. package/plugins/CSS2DPlugin/index.d.ts +5 -0
  356. package/plugins/CSS2DPlugin/index.js +255 -0
  357. package/plugins/CSS2DPlugin/index.mjs +255 -0
  358. package/plugins/CSS2DPlugin/style.css_raw.js +275 -0
  359. package/plugins/CSS2DPlugin/style.css_raw.mjs +275 -0
  360. package/plugins/CSS2DPlugin/typing.d.ts +31 -0
  361. package/plugins/CSS3DPlugin/Controller.d.ts +64 -0
  362. package/plugins/CSS3DPlugin/Controller.js +255 -0
  363. package/plugins/CSS3DPlugin/Controller.mjs +255 -0
  364. package/plugins/CSS3DPlugin/index.d.ts +5 -0
  365. package/plugins/CSS3DPlugin/index.js +255 -0
  366. package/plugins/CSS3DPlugin/index.mjs +255 -0
  367. package/plugins/CSS3DPlugin/style.css_raw.js +274 -0
  368. package/plugins/CSS3DPlugin/style.css_raw.mjs +274 -0
  369. package/plugins/CSS3DPlugin/typing.d.ts +33 -0
  370. package/plugins/FloorplanPlugin/Controller.d.ts +100 -0
  371. package/plugins/FloorplanPlugin/Controller.js +255 -0
  372. package/plugins/FloorplanPlugin/Controller.mjs +255 -0
  373. package/plugins/FloorplanPlugin/index.d.ts +6 -0
  374. package/plugins/FloorplanPlugin/index.js +255 -0
  375. package/plugins/FloorplanPlugin/index.mjs +255 -0
  376. package/plugins/FloorplanPlugin/render/assets.d.ts +9 -0
  377. package/plugins/FloorplanPlugin/render/assets.js +255 -0
  378. package/plugins/FloorplanPlugin/render/assets.mjs +255 -0
  379. package/plugins/FloorplanPlugin/render/index.d.ts +35 -0
  380. package/plugins/FloorplanPlugin/render/index.js +255 -0
  381. package/plugins/FloorplanPlugin/render/index.mjs +255 -0
  382. package/plugins/FloorplanPlugin/render/isPointInPolygon.d.ts +5 -0
  383. package/plugins/FloorplanPlugin/render/isPointInPolygon.js +255 -0
  384. package/plugins/FloorplanPlugin/render/isPointInPolygon.mjs +255 -0
  385. package/plugins/FloorplanPlugin/render/renderFloor.d.ts +22 -0
  386. package/plugins/FloorplanPlugin/render/renderFloor.js +255 -0
  387. package/plugins/FloorplanPlugin/render/renderFloor.mjs +255 -0
  388. package/plugins/FloorplanPlugin/render/roomLabelVisibility.d.ts +10 -0
  389. package/plugins/FloorplanPlugin/render/roomLabelVisibility.js +255 -0
  390. package/plugins/FloorplanPlugin/render/roomLabelVisibility.mjs +255 -0
  391. package/plugins/FloorplanPlugin/render/style.css_raw.js +585 -0
  392. package/plugins/FloorplanPlugin/render/style.css_raw.mjs +585 -0
  393. package/plugins/FloorplanPlugin/typing.d.ts +156 -0
  394. package/plugins/FloorplanPlugin/typings/floorplanData.d.ts +112 -0
  395. package/plugins/FloorplanPlugin/typings/floorplanJson.d.ts +167 -0
  396. package/plugins/FloorplanPlugin/typings/floorplanServerData.d.ts +78 -0
  397. package/plugins/FloorplanPlugin/typings/index.d.ts +3 -0
  398. package/plugins/FloorplanPlugin/utils/changeMode.d.ts +5 -0
  399. package/plugins/FloorplanPlugin/utils/changeMode.js +255 -0
  400. package/plugins/FloorplanPlugin/utils/changeMode.mjs +255 -0
  401. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.d.ts +6 -0
  402. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.js +255 -0
  403. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.mjs +255 -0
  404. package/plugins/FloorplanPlugin/utils/correctFiveState.d.ts +11 -0
  405. package/plugins/FloorplanPlugin/utils/correctFiveState.js +255 -0
  406. package/plugins/FloorplanPlugin/utils/correctFiveState.mjs +255 -0
  407. package/plugins/FloorplanPlugin/utils/equal.d.ts +9 -0
  408. package/plugins/FloorplanPlugin/utils/equal.js +255 -0
  409. package/plugins/FloorplanPlugin/utils/equal.mjs +255 -0
  410. package/plugins/FloorplanPlugin/utils/filter.d.ts +8 -0
  411. package/plugins/FloorplanPlugin/utils/filter.js +255 -0
  412. package/plugins/FloorplanPlugin/utils/filter.mjs +255 -0
  413. package/plugins/FloorplanPlugin/utils/fiveModelLoad.d.ts +6 -0
  414. package/plugins/FloorplanPlugin/utils/fiveModelLoad.js +255 -0
  415. package/plugins/FloorplanPlugin/utils/fiveModelLoad.mjs +255 -0
  416. package/plugins/FloorplanPlugin/utils/formatData.d.ts +6 -0
  417. package/plugins/FloorplanPlugin/utils/formatData.js +255 -0
  418. package/plugins/FloorplanPlugin/utils/formatData.mjs +255 -0
  419. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.d.ts +20 -0
  420. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.js +255 -0
  421. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.mjs +255 -0
  422. package/plugins/FloorplanPlugin/utils/formatPosition.d.ts +33 -0
  423. package/plugins/FloorplanPlugin/utils/formatPosition.js +255 -0
  424. package/plugins/FloorplanPlugin/utils/formatPosition.mjs +255 -0
  425. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.d.ts +6 -0
  426. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.js +255 -0
  427. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.mjs +255 -0
  428. package/plugins/FloorplanPlugin/utils/getPxmm.d.ts +19 -0
  429. package/plugins/FloorplanPlugin/utils/getPxmm.js +255 -0
  430. package/plugins/FloorplanPlugin/utils/getPxmm.mjs +255 -0
  431. package/plugins/FloorplanPlugin/utils/isTruelyObject.d.ts +4 -0
  432. package/plugins/FloorplanPlugin/utils/isTruelyObject.js +255 -0
  433. package/plugins/FloorplanPlugin/utils/isTruelyObject.mjs +255 -0
  434. package/plugins/FloorplanPlugin/utils/nearlyEqual.d.ts +8 -0
  435. package/plugins/FloorplanPlugin/utils/nearlyEqual.js +255 -0
  436. package/plugins/FloorplanPlugin/utils/nearlyEqual.mjs +255 -0
  437. package/plugins/FloorplanPlugin/utils/polylabel.d.ts +8 -0
  438. package/plugins/FloorplanPlugin/utils/polylabel.js +255 -0
  439. package/plugins/FloorplanPlugin/utils/polylabel.mjs +255 -0
  440. package/plugins/FloorplanPlugin/utils/to.d.ts +5 -0
  441. package/plugins/FloorplanPlugin/utils/to.js +255 -0
  442. package/plugins/FloorplanPlugin/utils/to.mjs +255 -0
  443. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.d.ts +1 -1
  444. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.js +255 -0
  445. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.mjs +255 -0
  446. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.d.ts +1 -1
  447. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.js +255 -0
  448. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.mjs +255 -0
  449. package/plugins/Object3DHelperPlugin/Controller.d.ts +99 -0
  450. package/plugins/Object3DHelperPlugin/Controller.js +255 -0
  451. package/plugins/Object3DHelperPlugin/Controller.mjs +255 -0
  452. package/plugins/Object3DHelperPlugin/Controllers/BaseController.d.ts +139 -0
  453. package/plugins/Object3DHelperPlugin/Controllers/BaseController.js +255 -0
  454. package/plugins/Object3DHelperPlugin/Controllers/BaseController.mjs +255 -0
  455. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.d.ts +16 -0
  456. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.js +255 -0
  457. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.mjs +255 -0
  458. package/plugins/Object3DHelperPlugin/Controllers/MoveController.d.ts +66 -0
  459. package/plugins/Object3DHelperPlugin/Controllers/MoveController.js +255 -0
  460. package/plugins/Object3DHelperPlugin/Controllers/MoveController.mjs +255 -0
  461. package/plugins/Object3DHelperPlugin/Controllers/RotateController.d.ts +61 -0
  462. package/plugins/Object3DHelperPlugin/Controllers/RotateController.js +255 -0
  463. package/plugins/Object3DHelperPlugin/Controllers/RotateController.mjs +255 -0
  464. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.d.ts +17 -0
  465. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.js +255 -0
  466. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.mjs +255 -0
  467. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.d.ts +97 -0
  468. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.js +255 -0
  469. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.mjs +255 -0
  470. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.d.ts +16 -0
  471. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.js +255 -0
  472. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.mjs +255 -0
  473. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.d.ts +37 -0
  474. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.js +255 -0
  475. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.mjs +255 -0
  476. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.d.ts +93 -0
  477. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.js +255 -0
  478. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.mjs +255 -0
  479. package/plugins/Object3DHelperPlugin/constant.d.ts +27 -0
  480. package/plugins/Object3DHelperPlugin/constant.js +255 -0
  481. package/plugins/Object3DHelperPlugin/constant.mjs +255 -0
  482. package/plugins/Object3DHelperPlugin/index.d.ts +6 -0
  483. package/plugins/Object3DHelperPlugin/index.js +255 -0
  484. package/plugins/Object3DHelperPlugin/index.mjs +255 -0
  485. package/plugins/Object3DHelperPlugin/typing.d.ts +143 -0
  486. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.d.ts +22 -0
  487. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.js +255 -0
  488. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.mjs +255 -0
  489. package/plugins/Object3DHelperPlugin/utils/CenterHandle.d.ts +23 -0
  490. package/plugins/Object3DHelperPlugin/utils/CenterHandle.js +255 -0
  491. package/plugins/Object3DHelperPlugin/utils/CenterHandle.mjs +255 -0
  492. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.d.ts +19 -0
  493. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.js +255 -0
  494. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.mjs +255 -0
  495. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.d.ts +5 -0
  496. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.js +255 -0
  497. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.mjs +255 -0
  498. package/plugins/Object3DHelperPlugin/utils/cameraHooks.d.ts +3 -0
  499. package/plugins/Object3DHelperPlugin/utils/cameraHooks.js +255 -0
  500. package/plugins/Object3DHelperPlugin/utils/cameraHooks.mjs +255 -0
  501. package/plugins/Object3DHelperPlugin/utils/direction.d.ts +14 -0
  502. package/plugins/Object3DHelperPlugin/utils/direction.js +255 -0
  503. package/plugins/Object3DHelperPlugin/utils/direction.mjs +255 -0
  504. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.d.ts +5 -0
  505. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.js +255 -0
  506. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.mjs +255 -0
  507. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.d.ts +8 -0
  508. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.js +255 -0
  509. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.mjs +255 -0
  510. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.d.ts +8 -0
  511. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.js +255 -0
  512. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.mjs +255 -0
  513. package/plugins/Object3DHelperPlugin/utils/solidGuide.d.ts +27 -0
  514. package/plugins/Object3DHelperPlugin/utils/solidGuide.js +255 -0
  515. package/plugins/Object3DHelperPlugin/utils/solidGuide.mjs +255 -0
  516. package/plugins/Object3DHelperPlugin/utils/tipsDom.d.ts +8 -0
  517. package/plugins/Object3DHelperPlugin/utils/tipsDom.js +255 -0
  518. package/plugins/Object3DHelperPlugin/utils/tipsDom.mjs +255 -0
  519. package/plugins/PanoAnimePlugin/Controller.d.ts +49 -0
  520. package/plugins/PanoAnimePlugin/Controller.js +255 -0
  521. package/plugins/PanoAnimePlugin/Controller.mjs +255 -0
  522. package/plugins/PanoAnimePlugin/index.d.ts +5 -0
  523. package/plugins/PanoAnimePlugin/index.js +255 -0
  524. package/plugins/PanoAnimePlugin/index.mjs +255 -0
  525. package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
  526. package/plugins/WordPassPlugin/Controller.d.ts +62 -0
  527. package/plugins/WordPassPlugin/Controller.js +255 -0
  528. package/plugins/WordPassPlugin/Controller.mjs +255 -0
  529. package/plugins/WordPassPlugin/hersheyFont.d.ts +11 -0
  530. package/plugins/WordPassPlugin/hersheyFont.js +255 -0
  531. package/plugins/WordPassPlugin/hersheyFont.mjs +255 -0
  532. package/plugins/WordPassPlugin/index.d.ts +7 -0
  533. package/plugins/WordPassPlugin/index.js +255 -0
  534. package/plugins/WordPassPlugin/index.mjs +255 -0
  535. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.d.ts +82 -0
  536. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.js +256 -0
  537. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.mjs +256 -0
  538. package/plugins/WordPassPlugin/typing.d.ts +109 -0
  539. package/plugins/WordPassPlugin/word-pass.d.ts +172 -0
  540. package/plugins/WordPassPlugin/word-pass.js +255 -0
  541. package/plugins/WordPassPlugin/word-pass.mjs +255 -0
  542. package/plugins/index.d.ts +8 -0
  543. package/plugins/index.js +3 -3
  544. package/plugins/index.mjs +3 -287
  545. package/plugins/thirdParty/CSS2DRenderer.d.ts +37 -0
  546. package/plugins/thirdParty/CSS2DRenderer.js +255 -0
  547. package/plugins/thirdParty/CSS2DRenderer.mjs +255 -0
  548. package/plugins/thirdParty/CSS3DRenderer.d.ts +45 -0
  549. package/plugins/thirdParty/CSS3DRenderer.js +255 -0
  550. package/plugins/thirdParty/CSS3DRenderer.mjs +255 -0
  551. package/plugins/thirdParty/OrbitControls.d.ts +78 -0
  552. package/plugins/thirdParty/doctorstrange-model.d.ts +92 -0
  553. package/plugins/thirdParty/doctorstrange-model.js +610 -0
  554. package/plugins/thirdParty/doctorstrange-model.mjs +610 -0
  555. package/plugins/thirdParty/domevents.d.ts +36 -0
  556. package/plugins/thirdParty/domevents.js +255 -0
  557. package/plugins/thirdParty/domevents.mjs +255 -0
  558. package/plugins/utils/absoluteUrl.js +255 -0
  559. package/plugins/utils/absoluteUrl.mjs +255 -0
  560. package/plugins/utils/calculatePath.d.ts +3 -0
  561. package/plugins/utils/calculatePath.js +255 -0
  562. package/plugins/utils/calculatePath.mjs +255 -0
  563. package/plugins/utils/clamp.d.ts +2 -0
  564. package/plugins/utils/clamp.js +255 -0
  565. package/plugins/utils/clamp.mjs +255 -0
  566. package/plugins/utils/uuid.d.ts +2 -0
  567. package/plugins/utils/uuid.js +255 -0
  568. package/plugins/utils/uuid.mjs +255 -0
  569. package/react/context.d.ts +1 -1
  570. package/react/createProvider.d.ts +1 -1
  571. package/react/fiveApp.d.ts +1 -1
  572. package/react/hooks/unsafe__useFiveInstance.d.ts +1 -1
  573. package/react/hooks/useFiveAction.d.ts +1 -1
  574. package/react/hooks/useFiveCurrentObserver.d.ts +1 -1
  575. package/react/hooks/useFiveCurrentState.d.ts +1 -1
  576. package/react/hooks/useFiveEventCallback.d.ts +1 -1
  577. package/react/hooks/useFiveModelEffect.d.ts +1 -1
  578. package/react/hooks/useFiveModelIntersectRaycaster.d.ts +1 -1
  579. package/react/hooks/useFivePlugin.d.ts +1 -1
  580. package/react/hooks/useFiveSceneEffect.d.ts +1 -1
  581. package/react/hooks/useFiveState.d.ts +1 -1
  582. package/react/hooks/useFiveWork.d.ts +1 -1
  583. package/react/index.js +3 -3
  584. package/react/index.mjs +3 -3
  585. package/react/withFive.d.ts +1 -1
  586. package/sticker/geometry.d.ts +3 -0
  587. package/sticker/index.d.ts +68 -0
  588. package/sticker/index.js +255 -0
  589. package/sticker/index.mjs +358 -0
  590. package/umd/five-gltf-loader.js +255 -0
  591. package/umd/five-line.js +322 -0
  592. package/umd/five-plugins.js +817 -3
  593. package/umd/five-react.js +3 -3
  594. package/umd/five-sticker.js +255 -0
  595. package/umd/five-vfx.js +323 -0
  596. package/umd/five.js +472 -412
  597. package/vfx/airflow/airflow.d.ts +18 -0
  598. package/vfx/common/simplex-noise.d.ts +2 -0
  599. package/vfx/frame/frame.d.ts +27 -0
  600. package/vfx/index.d.ts +7 -0
  601. package/vfx/index.js +255 -0
  602. package/vfx/index.mjs +738 -0
  603. package/vfx/particle/instance.d.ts +36 -0
  604. package/vfx/particle/particle.d.ts +119 -0
  605. package/vfx/particle/utils.d.ts +11 -0
  606. package/vfx/particle-gpu/particle.d.ts +75 -0
  607. package/vfx/particle-gpu/utils.d.ts +11 -0
  608. package/vfx/spotLight/spotLight.d.ts +15 -0
  609. package/work-downloader/components/model-3d-tile.d.ts +2 -0
  610. package/work-downloader/components/model.d.ts +3 -0
  611. package/work-downloader/components/observer.d.ts +9 -0
  612. package/work-downloader/download.d.ts +16 -0
  613. package/work-downloader/index.d.ts +2 -0
  614. package/work-downloader/index.js +255 -0
  615. package/work-downloader/index.mjs +595 -0
  616. package/work-downloader/type.d.ts +28 -0
  617. package/work-downloader/utils/download-to-file.d.ts +1 -0
  618. package/work-downloader/utils/image-processing.d.ts +7 -0
  619. package/work-downloader/utils/join-url.d.ts +2 -0
  620. package/work-downloader/utils/log.d.ts +1 -0
  621. package/work-downloader/utils/relative-url.d.ts +1 -0
  622. package/docs/interfaces/index.PBMHDRConfig.html +0 -12
  623. package/five/gaussian-splatting/util/renderData.d.ts +0 -66
  624. package/five/gaussian-splatting/worker/dataWorker.d.ts +0 -1
  625. package/five/three-version-check.d.ts +0 -1
  626. package/five/utils/hdr-data.d.ts +0 -13
  627. package/five/utils/shaderContentFix.d.ts +0 -7
  628. /package/five/{renderer/compute-renderers/shaders/rasterize.d.ts → gaussian-splatting/gpu-sort/shaders/prefixSum.d.ts} +0 -0
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # Five.js
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@realsee/five.svg?style=flat-square&logo=npm&label=npm%20install%20@realsee/five)](https://www.npmjs.com/package/@realsee/five)
3
+ [![npm version](https://img.shields.io/npm/v/@realsee/five-webgpu.svg?style=flat-square&logo=npm&label=npm%20install%20@realsee/five-webgpu)](https://www.npmjs.com/package/@realsee/five-webgpu)
4
4
 
5
- 贝壳如视三维渲染框架
5
+ 如视三维渲染框架
6
6
 
7
7
  > **🤖 For AI Assistants (Copilot, Cursor, etc.):**
8
- > If this package is installed in your project, you can find **AI-friendly documentation** directly in `node_modules/@realsee/five/`. Please **READ** `node_modules/@realsee/five/ai_guides/README.md` as your primary source of truth. It contains comprehensive API references and guides optimized for LLMs.
9
- > If not installed locally, you can access the same documentation via `https://cdn.jsdelivr.net/npm/@realsee/five@alpha/ai_guides/README.md` or `https://unpkg.com/@realsee/five@alpha/ai_guides/README.md`.
8
+ > If this package is installed in your project, you can find **AI-friendly documentation** directly in `node_modules/@realsee/five-webgpu/`. Please **READ** `node_modules/@realsee/five-webgpu/ai_guides/README.md` as your primary source of truth. It contains comprehensive API references and guides optimized for LLMs.
9
+ > If not installed locally, you can access the same documentation via `https://cdn.jsdelivr.net/npm/@realsee/five-webgpu@alpha/ai_guides/README.md` or `https://unpkg.com/@realsee/five-webgpu@alpha/ai_guides/README.md`.
10
10
  ## Introduction
11
11
 
12
- **Five** 是 [贝壳如视(realsee.com)](https://realsee.com) 提供的在浏览器中运行的三维空间渲染 Javascript SDK。基于 [Three.js](https://threejs.org/) 开发,帮助开发者在浏览器中构建高质量的 VR 看房与空间交互应用。
12
+ **Five** 是 [如视(realsee.com)](https://realsee.com) 提供的在浏览器中运行的三维空间渲染 Javascript SDK。基于 [Three.js](https://threejs.org/) 开发,帮助开发者在浏览器中构建高质量的 VR 看房与空间交互应用。
13
13
 
14
14
  核心能力包括:
15
15
  * **全景浏览**: 高分辨率全景图的高效加载与平滑浏览。
@@ -22,17 +22,17 @@
22
22
  通过 npm 或 yarn 安装:
23
23
 
24
24
  ```bash
25
- npm install three@^0.117.1 @realsee/five
25
+ npm install three@^0.183.2 @realsee/five-webgpu
26
26
  # or
27
- yarn add three@^0.117.1 @realsee/five
27
+ yarn add three@^0.183.2 @realsee/five-webgpu
28
28
  ```
29
29
 
30
- > **注意**: Five 依赖 `three`,目前推荐版本为 `0.117.1`。
30
+ > **注意**: Five 依赖 `three`,目前推荐版本为 `0.183.2`。
31
31
 
32
32
  ## Quick Start
33
33
 
34
34
  ```typescript
35
- import { Five, parseWork } from "@realsee/five";
35
+ import { Five, parseWork } from "@realsee/five-webgpu";
36
36
 
37
37
  // 1. 初始化
38
38
  const five = new Five();
@@ -0,0 +1,255 @@
1
+ /**
2
+ * @license
3
+ * @realsee/five-webgpu
4
+ * Generated: 10/26/2026
5
+ * Version: 1.0.0-alpha.10
6
+ * Terms:
7
+ * Realsee SDK License Agreement
8
+ * Update: July 28, 2021
9
+ * THIS LICENSE AGREEMENT BETWEEN YOU AND 【BEIKE REALSEE TECHNOLOGY (HK)
10
+ * LIMITED】(“Realsee”) FORMS A LEGALLY BINDING CONTRACT BETWEEN YOU AND REALSEE IN
11
+ * RELATION TO YOUR USE OF THE SDK. This License Agreement accompanies the Realsee
12
+ * Software Development Kit(s) for the software and related explanatory materials
13
+ * (the "SDK") and includes any upgrades, modified versions, updates, additions,
14
+ * and copies of the SDK licensed to You by Realsee.
15
+ * BY DOWNLOADING, INSTALLING, OR OTHERWISE ACCESSING OR USING THE SDK, YOU AGREE
16
+ * THAT YOU HAVE READ, UNDERSTOOD, AND AGREE TO BE BOUND BY THIS AGREEMENT. YOU ARE
17
+ * AGREEING ON YOUR OWN BEHALF AND/OR ON BEHALF OF YOUR COMPANY OR ORGANIZATION TO
18
+ * THE TERMS AND CONDITIONS STATED BELOW.
19
+ * This Agreement applies to Your use of the SDK in the country in which You
20
+ * legally install it (“Territory”) and is subject to the laws of such Territory
21
+ * and further subject to Section 12 below. Different terms, conditions, and
22
+ * limitations may apply to the use of the SDK in any additional countries.
23
+ * 1. DEFINITIONS.
24
+ * “Agreement” means this Realsee SDK License Agreement.
25
+ * “Developer”, “You” and “Your” means the person(s) or entity acquiring or using
26
+ * the SDK or otherwise exercising rights under the terms of this Agreement.
27
+ * “Documentation” means the technical or other specifications or documentation
28
+ * that Realsee may provide to You for use in connection with the SDK.
29
+ * “Integrated Product” means any software, website, or on-line service developed
30
+ * by You based on or using the SDK (collectively, the “Integrated Product”).
31
+ * “Intellectual Property” means any patents, patent rights, trademarks, service
32
+ * marks, registered and unregistered designs, applications for any of the
33
+ * foregoing, copyright, and any other similar protected rights in any country and
34
+ * to the extent recognised by any relevant jurisdiction as intellectual property,
35
+ * trade secrets, know-how and confidential information. Realsee reserves all
36
+ * rights not expressly granted to You.
37
+ * “Realsee” means [Beike Realsee Technology (HK) Limited, a company incorporated
38
+ * and validly existing under the laws of Hong Kong].
39
+ * “SDK” means the Realsee-proprietary Software Development Kits (SDK) provided
40
+ * hereunder, includes all development tools (including any compiler and debugger),
41
+ * application programming interfaces (“APIs”), libraries, binary utilities, header
42
+ * files, Documentation, content, data, code samples, and other materials provided
43
+ * to You in connection with this Agreement, whether delivered through a download,
44
+ * or any other media or form, and is licensed, not sold, to You by Realsee for use
45
+ * only under the terms of this Agreement. The terms of this Agreement will govern
46
+ * any updates provided by Realsee that replace and/or supplement the original SDK
47
+ * delivered to You, unless such update is accompanied by a separate license, in
48
+ * which case the terms of such license will govern.
49
+ * 2. LICENSED USES AND RESTRICTIONS.
50
+ * 2.1 Subject to the restrictions contained in this Section 2, Realsee grants to
51
+ * You during the term, a limited, non-exclusive, revocable, non-sublicensable,
52
+ * non-transferable license to install and use the SDK within the Territory only
53
+ * for the purpose of internal development.
54
+ * 2.2 Restrictions. You acknowledge and agree that, You shall not, and shall
55
+ * ensure that Your affiliates, employees, agents, representatives, officers,
56
+ * representatives, and subcontractors do not (directly or indirectly):
57
+ * 2.2.1 decompile, reverse engineer, disassemble or attempt to derive the source
58
+ * code of, those components of the SDK provided in object code form, or any part
59
+ * thereof;
60
+ * 2.2.2 remove, alter, or obscure any copyright notice or other proprietary rights
61
+ * notice on any part of the SDK;
62
+ * 2.2.3 sell, assign, pledge, rent, lease, lend, upload to or host on any website
63
+ * or server for use by any third party except You, redistribute, or sublicense the
64
+ * SDK (or any part thereof), or operate the SDK (or any part thereof) in the
65
+ * capacity of a service bureau or other hosted services provider, in whole or in
66
+ * part, nor may You enable others to do so;
67
+ * 2.2.4 or alter, modify, customize or improve the SDK, or any part thereof;
68
+ * 2.2.5 use the SDK (or any part thereof) for any illegal purpose, in any manner
69
+ * that is inconsistent with the terms of this Agreement, or to engage in any
70
+ * illegal activity;
71
+ * 2.2.6 use the SDK (or any part thereof) in any manner that may damage the
72
+ * operation of Realsee’s products or services; or
73
+ * 2.2.7 use the SDK or any information contained therein or otherwise provided by
74
+ * Realsee for the purpose of developing, or having developed, any product
75
+ * competitive with any Realsee product or service, as determined by Realsee in its
76
+ * sole discretion;
77
+ * 2.2.8 include any portion of the SDK in Your Developer products.
78
+ * 2.3 Realsee has the right to impose reasonable conditions such as a reasonable
79
+ * fee for use of the SDK in Integrated Product in the future.
80
+ * 2.4 You may make a limited number of copies of the SDK to be used by Your
81
+ * employees or consultants as provided herein, and not for general business
82
+ * purposes, and such employees or consultants shall be subject to the obligations
83
+ * and restrictions in this Agreement.
84
+ * 2.5 All licenses not expressly granted in this Agreement are reserved and no
85
+ * other licenses, immunity, or rights, express or implied, are granted by Realsee,
86
+ * by implication, estoppel, or otherwise.
87
+ * 3. CONFIDENTIALITY.
88
+ * The SDK and all source code, Documentation, specifications, engineering details,
89
+ * and related information pertaining to the SDK, whether in oral, written,
90
+ * graphic, or electronic form, are and shall remain the confidential and
91
+ * proprietary information of Realsee or its licensors (collectively, the
92
+ * “Confidential Information”). You shall (i) disclose Confidential Information to
93
+ * only those directors and employees (collectively, “Affiliates”) whose duties
94
+ * justify their need to know such information and who have been clearly informed
95
+ * of their obligation to maintain the confidential, proprietary, and/or trade
96
+ * secret status of such Confidential Information; and (ii) use Confidential
97
+ * Information solely in accordance with the license granted hereunder. In any
98
+ * event, You and Your Affiliates shall treat Confidential Information as strictly
99
+ * confidential and shall use the same care to prevent disclosure of such
100
+ * information as You use with respect to Your own similar confidential and/or
101
+ * proprietary information, which shall not be less than the care a reasonable
102
+ * person would use under similar circumstances. All Confidential Information, and
103
+ * any copies thereof, shall be returned promptly to Realsee upon request. You
104
+ * shall ensure that Your Affiliates comply with the provisions of this Section 3,
105
+ * and You shall be liable for any breach of this Section 3 resulting from the act
106
+ * or omission of any of Your Affiliates. You shall not disclose Confidential
107
+ * Information to any third party, including, without limitation, any of Your
108
+ * subcontractors.
109
+ * 4. PROPRIETARY RIGHTS.
110
+ * 4.1 As between You and Realsee, Realsee and/or its licensors retain ownership of
111
+ * all right, title, and interest in, to, and under the SDK, including, without
112
+ * limitation, all patents, copyrights, trade secrets, trademarks and other
113
+ * intellectual property and other proprietary rights therein, and reserve all
114
+ * rights not expressly granted to You.
115
+ * 4.2 The items contained in the SDK are the intellectual property of Realsee and
116
+ * its licensors and are protected by PRC copyright and patent law, international
117
+ * treaty provisions and applicable laws of the country in which it is being used.
118
+ * You agree to protect all copyright and other ownership interests of Realsee
119
+ * and/or its licensors in all items in the SDK supplied under this License
120
+ * Agreement. You agree that all copies of the items in the SDK, reproduced for any
121
+ * reason by You, contain the same copyright notices, and other proprietary notices
122
+ * as appropriate, as appear on or in the original items delivered by Realsee in
123
+ * the SDK. Realsee and/or its licensors retain title and ownership of the items in
124
+ * the SDK, the media on which it is loaded, and all subsequent copies, regardless
125
+ * of the form or media in or on which the original and other copies may exist.
126
+ * Except as stated above, this Agreement does not grant You any rights to patents,
127
+ * copyrights, trade secrets, trademarks or any other rights in respect to the
128
+ * items in the SDK.
129
+ * 5. TERM AND TERMINATION.
130
+ * 5.1 This Agreement is effective until terminated. Realsee has the right to
131
+ * terminate this Agreement immediately, without judicial intervention, if You fail
132
+ * to comply with any term herein. Upon any such termination You must remove all
133
+ * full and partial copies of the items in the SDK from Your computer and
134
+ * discontinue the use of the items in the SDK.
135
+ * 5.2 Realsee may at any time, terminate the Agreement with You if: (A) You have
136
+ * breached any provision of the Agreement; or (B) Realsee is required to do so by
137
+ * law; or (C) Realsee decides to no longer provide the SDK or certain parts of the
138
+ * SDK to users in the country in which You are resident or from which You use the
139
+ * service, or the provision of the SDK or certain SDK services to You by Realsee
140
+ * is, in Realsee's sole discretion, no longer legally or commercially viable.
141
+ * 5.3 When the Agreement comes to an end, all of the legal rights, obligations and
142
+ * liabilities that You and Realsee have benefited from, been subject to (or which
143
+ * have accrued over time whilst the Agreement has been in force) or which are
144
+ * expressed to continue indefinitely, shall be unaffected by this cessation, and
145
+ * the provisions of Section 3, 4, 6, 7 and 8 shall continue to apply to such
146
+ * rights, obligations and liabilities indefinitely.
147
+ * 6. DISCLAIMER OF WARRANTY.
148
+ * YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE
149
+ * LAW, USE OF THE SDK (OR ANY PART THEREOF) IS AT YOUR SOLE RISK AND THAT THE
150
+ * ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY, AND EFFORT IS
151
+ * WITH YOU. REALSEE LICENSES THE SDK TO YOU ONLY ON AN "AS-IS" BASIS. REALSEE
152
+ * MAKES NO REPRESENTATION WITH RESPECT TO THE ADEQUACY OF ANY ITEMS IN THE SDK,
153
+ * WHETHER OR NOT USED BY YOU IN THE DEVELOPMENT OF INTEGRATED PRODUCT, FOR ANY
154
+ * PARTICULAR PURPOSE OR WITH RESPECT TO THEIR ADEQUACY TO PRODUCE ANY PARTICULAR
155
+ * RESULT. REALSEE AND ITS LICENSORS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING
156
+ * OUT OF THIS AGREEMENT OR FROM THE DISTRIBUTION OR USE OF INTEGRATED PRODUCT
157
+ * CONTAINING PORTIONS OF THE SDK. REALSEE AND ITS LICENSORS DISCLAIM ALL
158
+ * WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED
159
+ * CONDITIONS OR WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
160
+ * OR NONINFRINGEMENT OF ANY THIRD PARTY RIGHT IN RESPECT OF THE ITEMS IN THE SDK
161
+ * OR ANY SERVICES RELATED TO THE SDK.
162
+ * REALSEE IS UNDER NO OBLIGATION TO PROVIDE ANY SUPPORT UNDER THIS LICENSE
163
+ * AGREEMENT, INCLUDING UPGRADES OR FUTURE VERSIONS OF THE SDK OR ANY PORTIONS
164
+ * THEREOF, TO YOU, END USER OR TO ANY OTHER PARTY.
165
+ * 7. LIMITATION OF LIABILITY.
166
+ * TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, IN NO EVENT WILL REALSEE OR ITS
167
+ * LICENSORS BE LIABLE FOR ANY DIRECT, INCIDENTAL, SPECIAL, INDIRECT, OR
168
+ * CONSEQUENTIAL DAMAGES, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE,
169
+ * LOSS OF BUSINESS, REVENUE, OR PROFITS, LOSS OF OPPORTUNITY (WHETHER DIRECT OR
170
+ * INDIRECT), CORRUPTION OR LOSS OF DATA, LOSS OF REPUTATION OR SAVINGS, DOWNTIME,
171
+ * OR DAMAGE TO, LOSS OF OR REPLACEMENT OF DATA OR TRANSACTIONS, COST OF
172
+ * PROCUREMENT OF SUBSTITUTE SERVICES, BUSINESS INTERRUPTION, OR ANY OTHER
173
+ * COMMERCIAL DAMAGES OR LOSSES, ARISING OUT OF OR RELATED TO YOUR USE OR INABILITY
174
+ * TO USE THE SDK (OR ANY PART THEREOF), ANY INTEGRATED PRODUCT, OR ANY THIRD PARTY
175
+ * SOFTWARE, APPLICATIONS, OR SERVICES IN CONJUNCTION WITH THE SDK (OR ANY PART
176
+ * THEREOF), HOWEVER CAUSED, REGARDLESS OF THE THEORY OF LIABILITY (CONTRACT, TORT,
177
+ * OR OTHERWISE) AND EVEN IF REALSEE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
178
+ * DAMAGES. IN NO EVENT WILL REALSEE’S TOTAL LIABILITY TO YOU FOR ALL DAMAGES
179
+ * EXCEED ONE HUNDRED DOLLARS ($100.00). THE FOREGOING LIMITATIONS WILL APPLY EVEN
180
+ * IF THE ABOVE STATED REMEDY FAILS OF ITS ESSENTIAL PURPOSE. THE LIMITATIONS
181
+ * CONTAINED IN SECTIONS 6 AND THIS SECTION 7 ARE A FUNDAMENTAL PART OF THE BASIS
182
+ * OF REALSEE’S BARGAIN HEREUNDER, AND REALSEE WOULD NOT ENTER INTO THIS AGREEMENT
183
+ * OR PROVIDE YOU WITH ACCESS TO THE SDK ABSENT SUCH LIMITATIONS.
184
+ * 8. INDEMNIFICATION.
185
+ * To the extent permitted by applicable law, You agree to indemnify, defend and
186
+ * hold harmless Realsee, its affiliates and each of their directors, officers,
187
+ * employees, independent contractors, and agents (each a “Realsee Indemnified
188
+ * Party”) from any and all claims, losses, liabilities, damages, expenses, and
189
+ * costs (including without limitation attorneys’ fees and court costs) incurred by
190
+ * a Realsee Indemnified Party as a result of: (i) Your non-compliance with any
191
+ * terms of this Agreement; (ii) Your use of the SDK (or any part thereof); or
192
+ * (iii) Your use of any Integrated Product, including any claim that Integrated
193
+ * Product infringes the copyright, trademark, trade secret or other intellectual
194
+ * property right of a third party.
195
+ * 9. ACKNOWLEDGEMENTS.
196
+ * Portions of the SDK may utilize or include third party software and other
197
+ * copyrighted material. Acknowledgments, licensing terms, and disclaimers for such
198
+ * material are contained in Documentation for the SDK or may otherwise accompany
199
+ * such material, and Your use of such materials governed by their respective
200
+ * terms. In the event of conflict between the terms of this Agreement and an
201
+ * applicable open source or third party agreement, the open source or third party
202
+ * agreement will control solely with respect to the open source software or third
203
+ * party software. Moreover, You shall not subject any items (including not limited
204
+ * to source code, object code, and any software) included in the SDK to any open
205
+ * source license.
206
+ * 10. NON-BLOCKING OF REALSEE DEVELOPMENT.
207
+ * You acknowledge that Realsee is currently developing or may develop technologies
208
+ * and products in the future that have or may have design and/or functionality
209
+ * similar to Integrated Product that You may develop based on Your license herein.
210
+ * Nothing in this Agreement shall impair, limit or curtail Realsee's right to
211
+ * continue with its development, maintenance and/or distribution of Realsee's
212
+ * technology or products.
213
+ * 11. GENERAL.
214
+ * 11.1 Export Control. You may not use or otherwise export or re-export the SDK
215
+ * (or any part thereof) except as authorized by United States law and the laws of
216
+ * the jurisdiction(s) in which the SDK (or any part thereof) was obtained. In
217
+ * particular, but without limitation, the SDK may not be exported or re-exported
218
+ * (i) into any U.S. embargoed countries or (ii) to anyone on the U.S. Treasury
219
+ * Department's list of Specially Designated Nationals or the U.S. Department of
220
+ * Commerce Denied Person's List or Entity List. By using the SDK (or any part
221
+ * thereof), You represent and warrant that You are not located in any such country
222
+ * or on any such list.
223
+ * 11.2 Governing Law. This Agreement and the rights of the parties hereunder shall
224
+ * be governed by and construed in accordance with the laws of People’s Republic of
225
+ * China (for purpose of this Agreement, excluding Hong Kong, Taiwan, and Macau),
226
+ * without reference to its conflict of laws principles. Any dispute, controversy
227
+ * or claim arising from or in connection with this Agreement, or the breach,
228
+ * termination or invalidity thereof, shall be submitted to China International
229
+ * Economic and Trade Arbitration Commission (“CIETAC”) for arbitration in Beijing
230
+ * which shall be conducted in accordance with the CIETAC's arbitration rules in
231
+ * effect at the time of applying for arbitration. The arbitral award is final and
232
+ * binding upon both parties.
233
+ * 11.3 Severability. If any provision of this Agreement is held by a court of
234
+ * competent jurisdiction to be unenforceable for any reason, the remaining
235
+ * provisions hereof will be unaffected and remain in full force and effect.
236
+ * 11.4. Modifications. Realsee reserves the right, from time to time, with or
237
+ * without notice to You, to make revisions to this Agreement in our sole and
238
+ * absolute discretion. The most current version of this Agreement will supersede
239
+ * all previous versions and shall be made available on the website where the SDK
240
+ * is made available, or by such other means as Realsee may determine in its
241
+ * discretion. Any modified versions of this Agreement hereto shall take effect
242
+ * from the time that it is made available. You shall be responsible for regularly
243
+ * checking for notice of any such modifications. You agree that Your continued use
244
+ * of the SDK constitutes Your agreement to the modified Agreement.
245
+ * 11.5 Relationship of the Parties. This Agreement will not be construed as
246
+ * creating an agency, partnership, joint venture, fiduciary duty, or any other
247
+ * form of legal association between You and Realsee, and You will not represent to
248
+ * the contrary, whether expressly, by implication, appearance, or otherwise.
249
+ * 11.6 Entire Agreement; Governing Language. This Agreement constitutes the entire
250
+ * agreement between You and Realsee with respect to the use of the SDK licensed
251
+ * hereunder and supersedes all prior understandings regarding such subject matter.
252
+ * No amendment to or modification of this Agreement will be binding unless in
253
+ * writing and signed by Realsee. You and Realsee hereto confirm that this
254
+ * Agreement and all related documents shall be drafted in English.
255
+ */var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
@@ -1,6 +1,6 @@
1
1
  # Five SDK Documentation
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@realsee/five.svg?style=flat-square&logo=npm&label=npm%20install%20@realsee/five)](https://www.npmjs.com/package/@realsee/five)
3
+ [![npm version](https://img.shields.io/npm/v/@realsee/five-webgpu.svg?style=flat-square&logo=npm&label=npm%20install%20@realsee/five-webgpu)](https://www.npmjs.com/package/@realsee/five-webgpu)
4
4
 
5
5
  - **Summary**: Five SDK 的文档索引与阅读指南,旨在帮助开发者与 AI 助手快速定位所需信息。
6
6
  - **Audience**: 开发者、AI 辅助编程工具。
@@ -32,7 +32,7 @@
32
32
  * 保存/恢复场景:**必须** 深刻理解 [State](./features/state.md)。它是 Five 的核心快照机制,包含 Pose、Mode 和 PanoIndex。不要尝试手动管理零散的相机参数,应统一使用 State。
33
33
  * **Coding Standards (代码规范)**:
34
34
  * 优先使用 TypeScript 类型提示。
35
- * 确保从 `@realsee/five` 导入核心类与类型 (e.g., `import { Five, Mode, Work, State } from "@realsee/five"`).
35
+ * 确保从 `@realsee/five-webgpu` 导入核心类与类型 (e.g., `import { Five, Mode, Work, State } from "@realsee/five-webgpu"`).
36
36
 
37
37
  ### 3. General Retrieval (通用检索)
38
38
  * **API Signatures**: [API Reference](./api.md) 是最权威的接口定义来源,包含方法的参数与返回值。
package/ai_guides/api.md CHANGED
@@ -24,7 +24,7 @@ const five = new Five(initArgs?: FiveInitArgs);
24
24
  | `five.scene` | `THREE.Scene` | The Three.js scene used for non-model elements. |
25
25
  | `five.modelScene` | `ModelScene` | The Three.js scene used for the model. |
26
26
  | `five.camera` | `Camera` | The internal camera. |
27
- | `five.renderer` | `THREE.WebGLRenderer` | The WebGL renderer. |
27
+ | `five.renderer` | `THREE.WebGPURenderer` | The WebGPU renderer. |
28
28
  | `five.needsRender` | `boolean` | Set to `true` to request a render frame in the next loop. |
29
29
  | `five.plugins` | `Object` | Access to registered plugins. |
30
30
 
@@ -32,7 +32,7 @@ const five = new Five(initArgs?: FiveInitArgs);
32
32
 
33
33
  | Property | Type | Description |
34
34
  | :--- | :--- | :--- |
35
- | `Five.Mode` | `Enum` | Available modes: `Panorama`, `Model`, `Floorplan`, `Topview`, `Mapview`, `VRPanorama`, `XRPanorama`. |
35
+ | `Five.Mode` | `Enum` | Available modes: `Panorama`, `Model`, `Floorplan`, `Topview`, `Mapview`, `VRPanorama`. |
36
36
 
37
37
  ## Initialization Configuration (`FiveInitArgs`)
38
38
 
@@ -40,8 +40,8 @@ Configuration object passed to the `Five` constructor.
40
40
 
41
41
  ```typescript
42
42
  interface FiveInitArgs {
43
- /** External WebGLRenderer. If provided, internal renderer creation is skipped. */
44
- renderer?: THREE.WebGLRenderer;
43
+ /** External WebGPURenderer. If provided, internal renderer creation is skipped. */
44
+ renderer?: THREE.WebGPURenderer;
45
45
 
46
46
  /** Width/Height of the viewport relative to container (0-1). */
47
47
  viewport?: { left: number; bottom: number; width: number; height: number };
@@ -80,12 +80,13 @@ interface FiveInitArgs {
80
80
 
81
81
  ## Core Methods
82
82
 
83
- ### `load(work, state?, options?)`
83
+ ### `load(inputWork, state?, options?, userAction?)`
84
84
  Loads a "Work" (dataset) into the Five instance.
85
85
 
86
- - **work**: The data object (`LooseWork` or `Work`) containing scene information.
86
+ - **inputWork**: The data object (`LooseWork` or `Work`) containing scene information.
87
87
  - **state**: Initial state overrides. `"inherit"`, `"initial"`, or a `State` object.
88
88
  - **options**: Loading options (e.g., transition duration).
89
+ - **userAction**: Whether the load was triggered by a user action. Defaults to `true`.
89
90
 
90
91
  ### `appendTo(element, size?)`
91
92
  Mounts the Five canvas to a DOM element.
@@ -243,8 +244,8 @@ These events follow a standard naming convention and provide typed event objects
243
244
  | :--- | :--- | :--- |
244
245
  | `works.load` | Triggered when work data starts loading. | `WorksEvent` |
245
246
  | `models.load` | Triggered when models are loaded. | `ModelSceneEvent` |
246
- | `model.tileLoad` | Triggered when a 3D tile is loaded. | `Tile` |
247
- | `model.tileUnload` | Triggered when a 3D tile is unloaded. | `Tile` |
247
+ | `models.tileLoad` | Triggered when a 3D tile is loaded. | `ModelTileEvent` |
248
+ | `models.tileUnload` | Triggered when a 3D tile is unloaded. | `ModelTileEvent` |
248
249
  | `pano.arrived` | Triggered when arrival at a panorama node. | `PanoEvent` |
249
250
  | `pano.texture.progress` | Triggered when panorama texture loading progresses. | `{ progress, panoIndex }` |
250
251
  | `render` | Triggered after each render frame. | `RenderEvent` |
@@ -104,7 +104,7 @@ five.changeMode(mode: Mode, options?, animationOptions?): Promise<void>
104
104
 
105
105
  | Parameter | Type | Default | Description |
106
106
  | :--- | :--- | :--- | :--- |
107
- | `modeChangeDuration` | `number` | `1000` | 模态切换 (如 Panorama -> Mapview) 的默认时长 (ms)。 |
107
+ | `modeChangeDuration` | `number` | `800` | 模态切换 (如 Panorama -> Mapview) 的默认时长 (ms)。 |
108
108
 
109
109
  ### MovePanoOptions Configuration (移动参数)
110
110
 
@@ -62,7 +62,7 @@ Clipper 的几何定义依赖于 `clippingBoxMatrix`。
62
62
 
63
63
  ```typescript
64
64
  import * as THREE from 'three';
65
- import { Five } from '@realsee/five';
65
+ import { Five } from '@realsee/five-webgpu';
66
66
 
67
67
  // 1. 创建一个辅助 Mesh 来定义裁切区域
68
68
  // 注意:必须使用 1x1x1 的 BoxGeometry,因为 Shader 是基于单位立方体判断的
@@ -98,7 +98,7 @@ Five 的渲染场景 (`five.scene`) 和 Observers (观察点) 使用 **Y-up** (Y
98
98
 
99
99
  ```typescript
100
100
  import * as THREE from 'three';
101
- import { ViewLayer } from '@realsee/five';
101
+ import { ViewLayer } from '@realsee/five-webgpu';
102
102
 
103
103
  // 假设已加载 ViewLayer
104
104
  const viewLayer: ViewLayer = ...;
@@ -70,7 +70,6 @@ Five 的事件系统将事件主要分为以下几类:
70
70
 
71
71
  - `pano.arrived`: 成功到达新点位(移动动画结束)。
72
72
  - `pano.moving`: 正在移动到新点位(动画进行中)。
73
- - `pano.willChange`: 即将发生点位变更(旧版兼容)。
74
73
  - `pano.error`: 点位加载或移动出错。
75
74
 
76
75
  ### State Events (状态变更)
@@ -100,7 +99,7 @@ Five 的事件系统将事件主要分为以下几类:
100
99
  监听点击事件并打印日志。
101
100
 
102
101
  ```typescript
103
- import { Five } from "@realsee/five";
102
+ import { Five } from "@realsee/five-webgpu";
104
103
 
105
104
  const five = new Five();
106
105
 
@@ -1,6 +1,6 @@
1
1
  # Five (Five 核心类)
2
2
 
3
- - **Summary**: Five 是 @realsee/five 的核心类,负责 3D 场景的渲染、资源加载、用户交互和状态管理。
3
+ - **Summary**: Five 是 @realsee/five-webgpu 的核心类,负责 3D 场景的渲染、资源加载、用户交互和状态管理。
4
4
  - **Schema**: FiveInitArgs 初始化参数接口。
5
5
  - **Concepts**: Instance Management, Rendering Loop, Resource Loading, State Sync.
6
6
  - **Configuration**: Five 初始化参数详解。
@@ -17,7 +17,7 @@
17
17
  ```typescript
18
18
  interface FiveInitArgs {
19
19
  /** 外部传入的渲染器 (如果传入,部分渲染配置将失效) */
20
- renderer?: THREE.WebGLRenderer;
20
+ renderer?: THREE.WebGPURenderer;
21
21
  /**
22
22
  * 屏幕渲染区域 { left, bottom, width, height }
23
23
  * 必须配合外部 renderer 使用
@@ -35,7 +35,7 @@ interface FiveInitArgs {
35
35
  textureOptions?: TextureOptions;
36
36
  /** 是否按需渲染 (默认 true, 推荐开启以节省性能) */
37
37
  onlyRenderIfNeeds?: boolean;
38
- /** 模式切换动画时长 (ms, 默认 1000) */
38
+ /** 模式切换动画时长 (ms, 默认 800) */
39
39
  modeChangeDuration?: number;
40
40
  /** 是否支持滚轮缩放 (默认 true) */
41
41
  enableWheel?: boolean;
@@ -43,6 +43,17 @@ interface FiveInitArgs {
43
43
  plugins?: FivePlugin[];
44
44
  /** 是否显示 Powered by Realsee */
45
45
  poweredByRealsee?: boolean;
46
+ /**
47
+ * 强制使用 WebGL2 回落后端(默认 false)
48
+ * 进入 XRPanorama(WebXR 头显全景)的前置条件。
49
+ * 只在构造期生效,后端无法在运行时切换,设备检测必须在 new Five() 之前完成。
50
+ * 详见下方《forceWebGL 与 XR 回落后端》。
51
+ */
52
+ forceWebGL?: boolean;
53
+ /**
54
+ * @deprecated 在 five-webgpu 中未接线、无效。需要 WebGL2 后端请使用 `forceWebGL`。
55
+ */
56
+ webgl2?: boolean;
46
57
  }
47
58
  ```
48
59
 
@@ -55,7 +66,7 @@ Five 实例是整个 3D 场景的入口。
55
66
 
56
67
  ### Rendering Loop (渲染循环)
57
68
  Five 内部维护了一个 `requestAnimationFrame` 循环。
58
- - **按需渲染**: 默认开启 `onlyRenderIfNeeds`,仅在画面发生变化(如视角移动、数据加载)时才触发 WebGL 绘制,大幅降低能耗。
69
+ - **按需渲染**: 默认开启 `onlyRenderIfNeeds`,仅在画面发生变化(如视角移动、数据加载)时才触发渲染,大幅降低能耗。
59
70
  - **手动触发**: 可以通过 `five.needsRender = true` 强制下一帧进行渲染。
60
71
 
61
72
  ### Resource Loading (资源加载)
@@ -71,8 +82,66 @@ Five 内部维护了一个 `requestAnimationFrame` 循环。
71
82
  | `textureOptions` | `TextureOptions` | `{}` | 贴图加载策略,同上 |
72
83
  | `onlyRenderIfNeeds` | `boolean` | `true` | 是否仅在需要时渲染,建议保持 `true` |
73
84
  | `antialias` | `boolean` | `false` | 抗锯齿,开启会增加性能消耗 |
74
- | `modeChangeDuration` | `number` | `1000` | 模式切换动画时长 (ms) |
85
+ | `modeChangeDuration` | `number` | `800` | 模式切换动画时长 (ms) |
75
86
  | `enableWheel` | `boolean` | `true` | 是否支持滚轮缩放 |
87
+ | `forceWebGL` | `boolean` | `false` | 强制使用 WebGL2 回落后端,进入 `XRPanorama` 的前置条件,详见下文 |
88
+ | `webgl2` | `boolean` | — | **已废弃**,在 five-webgpu 中未接线。需要 WebGL2 请用 `forceWebGL` |
89
+
90
+ ### forceWebGL 与 XR 回落后端
91
+
92
+ `forceWebGL` 让 five-webgpu 强制走 WebGL2 回落后端,而不是默认的 WebGPU 后端。它存在的唯一原因是 **进入 `XRPanorama`(WebXR 头显全景)模式**:`three` 的 WebGPU 后端目前不支持 WebXR,而 WebGL2 后端下 `renderer.xr` 完整可用。
93
+
94
+ **语义与使用约束**
95
+
96
+ - **语义**:`forceWebGL: true` 时,内部 `WebGPURenderer` 以 `{ forceWebGL: true }` 构造,使用 `WebGLBackend` 而非 WebGPU。
97
+ - **必须在 `new Five()` 时决定**:后端在 renderer 构造期定死,**运行时无法切换**。因此业务侧的「是否需要进入 XR」的设备检测必须发生在 `new Five()` 之前,不能等实例创建后再改。
98
+ - **与 `enableHDR` 互斥**:当 `forceWebGL` 为 `true` 时 `enableHDR` 不生效(`five.enableHDR` 会被置为 `false`),因为 XR 的 projection layer 固定 `colorFormat: RGBA8`,HDR 没有落地路径。
99
+ - **传入外部 `renderer` 时不生效**:如果通过 `renderer` 参数传入了外部渲染器,`forceWebGL` 不会对其生效,需由调用方自行在构造该 renderer 时设置 `forceWebGL`(与 `antialias` 等参数一致)。
100
+ - **`webgl2` 已废弃**:遗留的 `webgl2` 参数在 five-webgpu 中未接线、无任何效果;需要 WebGL2 后端请改用 `forceWebGL`。
101
+
102
+ **能力降级限制**(开启 `forceWebGL` 后不可规避)
103
+
104
+ 1. **XR 下没有后处理**:`XRPanorama` 模式会整体旁路 `FiveRenderer` 的后处理链路(合成 / EffectComposer 全屏 pass 均不参与),滤镜、泛光等后处理在头显中不生效。
105
+ 2. **点云走 NodeMaterial 路径**:`forceWebGL` 下点云不再走 WebGPU compute 光栅化,而是退回 NodeMaterial 渲染路径。
106
+ 3. **3DGS 走 CPU 排序,且 VR 中性能预期需放低**:`forceWebGL` 下 3DGS 只能走 CPU 排序(`RASTER_CPU_SORT`);在 XR 中还要叠加双眼渲染开销,务必对点数 / 显示做降级,不要期待与 WebGPU 后端相同的帧率。
107
+
108
+ ```typescript
109
+ import { Five } from "@realsee/five-webgpu";
110
+
111
+ // 设备检测需在 new Five() 之前完成
112
+ const needXR = detectNeedXR();
113
+
114
+ const five = new Five({
115
+ forceWebGL: needXR, // 一旦创建就无法再切换后端
116
+ });
117
+
118
+ five.load(workData);
119
+
120
+ // 进入 XR(需在用户手势回调中调用,会触发 WebXR 权限请求)
121
+ button.addEventListener("click", () => {
122
+ five.changeMode("XRPanorama").catch((error) => {
123
+ // 后端非 WebGL2 或浏览器不支持 WebXR 时,这里会收到含 forceWebGL 字样的中文错误
124
+ console.error(error);
125
+ });
126
+ });
127
+
128
+ // 用户摘下头显 / 退出 XR 时切回普通全景
129
+ five.on("xr.session.end", () => five.changeMode("Panorama"));
130
+ ```
131
+
132
+ 也可以直接使用内置的 `XRButton`,样式与 API 同原始 five 保持一致(`XRButton.createButton(onClickHook)`):
133
+
134
+ ```typescript
135
+ import { Five, XRButton } from "@realsee/five-webgpu";
136
+
137
+ const button = XRButton.createButton(() => five.changeMode("XRPanorama"));
138
+ document.body.appendChild(button);
139
+ ```
140
+
141
+ - 浏览器没有 `navigator.xr` 时显示 `WEBXR NOT AVAILABLE`(非 HTTPS 时显示 `WEBXR NEEDS HTTPS`),不支持 `immersive-vr` 时显示 `VR NOT SUPPORTED`。
142
+ - 回调返回 Promise 时,`XRButton` 会接住 reject。若失败原因是没有开启 `forceWebGL`(后端是 WebGPU),按钮文案会临时变为「需降级到 WebGL2」,3 秒后恢复。其他失败原因不改变按钮,错误通过 `five.on("error")` 上报。
143
+
144
+ > 更多模式说明(含 `XRPanorama` 与 `VRPanorama` 的区别)见 [mode.md](./mode.md),可运行示例参见 `examples/xr`。
76
145
 
77
146
  ## Examples
78
147
 
@@ -80,7 +149,7 @@ Five 内部维护了一个 `requestAnimationFrame` 循环。
80
149
  创建一个全屏的 Five 实例并加载数据。
81
150
 
82
151
  ```typescript
83
- import { Five, parseWork } from "@realsee/five";
152
+ import { Five, parseWork } from "@realsee/five-webgpu";
84
153
 
85
154
  // 1. 初始化实例
86
155
  const five = new Five({
@@ -101,9 +170,9 @@ five.load(workData);
101
170
 
102
171
  ```typescript
103
172
  import * as THREE from "three/webgpu";
104
- import { Five } from "@realsee/five";
173
+ import { Five } from "@realsee/five-webgpu";
105
174
 
106
- const renderer = new THREE.WebGLRenderer();
175
+ const renderer = new THREE.WebGPURenderer();
107
176
  renderer.setSize(window.innerWidth, window.innerHeight);
108
177
  document.body.appendChild(renderer.domElement);
109
178
 
@@ -152,8 +221,8 @@ five.updateCameraWithKeyframes(keyframes, 2000).then(() => {
152
221
  ### 实例方法 (Instance Methods)
153
222
 
154
223
  - **`appendTo(element: HTMLElement)`**: 将 canvas 挂载到指定 DOM 元素。
155
- - **`load(work: Work, state?: State, duration?: number)`**: 加载场景数据。详见 [work.md](./work.md)。
156
- - **`dispose()`**: 销毁实例,释放 WebGL 上下文与内存。
224
+ - **`load(inputWork, state?: "inherit" | "initial" | Partial<State>, options?: number | FiveLoadOptions, userAction?: boolean)`**: 加载场景数据。详见 [work.md](./work.md)。
225
+ - **`dispose()`**: 销毁实例并释放相关渲染资源。
157
226
  - **`updateCamera(pose: Partial<Pose>, duration: number, userAction?: boolean)`**: 移动相机(不触发点位移动)。移动相机的视角或位置,不会改变当前所在的 PanoIndex。如果动画中途被打断,Promise 会被 reject。
158
227
  - **`updateCameraWithKeyframes(keyframes: { progress: number; value: Pose; key?: string }[], duration: number, userAction?: boolean)`**: 通过关键帧动画移动相机。
159
228
  - **`refresh()`**: 强制刷新画布尺寸。通常在窗口 resize 时调用,Five 会自动监听 resize,但在某些布局变化场景下可能需要手动调用。
@@ -164,7 +233,7 @@ five.updateCameraWithKeyframes(keyframes, 2000).then(() => {
164
233
  1. **状态同步**:相机姿态已通过动画过渡到目标状态(`stateSynced` 为 true)。
165
234
  2. **模型加载**:如果是 Floorplan/Topview/Mapview/Model 模态,需等待模型加载完成 (`modelScene.loaded`)。
166
235
  3. **瓦片加载**:如果是 Panorama 模态且传入了 `{ tile: true }`,需等待当前视角的瓦片加载完成。
167
- - **`setState(state: Partial<State>, options?: ChangeStateOptions)`**: 变更当前状态(如点位、视角)。详见 [state.md](./state.md)。
236
+ - **`setState(state: Partial<State>, immediately?: boolean, userAction?: boolean)`**: 变更当前状态(如点位、视角)。详见 [state.md](./state.md)。
168
237
  - **`on(event, callback)` / `off(event, callback)`**: 事件监听。详见 [event.md](./event.md)。
169
238
 
170
239
  ## Related
@@ -180,5 +249,5 @@ five.updateCameraWithKeyframes(keyframes, 2000).then(() => {
180
249
  ---
181
250
 
182
251
  ```yaml
183
- tags: [five, initialization, core, instance, lifecycle]
252
+ tags: [five, initialization, core, instance, lifecycle, forceWebGL, webgl2, xr, webxr]
184
253
  ```
@@ -12,7 +12,7 @@
12
12
  所有手势事件的回调参数均为 `GestureEvent` 类型:
13
13
 
14
14
  ```typescript
15
- import { State } from "@realsee/five";
15
+ import { State } from "@realsee/five-webgpu";
16
16
  import * as THREE from "three/webgpu";
17
17
 
18
18
  interface GestureEvent {
@@ -44,7 +44,7 @@ interface GestureEvent {
44
44
 
45
45
  Five 的手势系统基于 Hammer.js 封装,主要包含以下几种手势:
46
46
 
47
- * **gesture.create**: 所有事件创建时。
47
+ * **gesture.fire**: 任意事件被触发。
48
48
  * **gesture.pan**: 拖拽/平移。
49
49
  * **gesture.pinch**: 双指缩放。
50
50
  * **gesture.tap**: 点击。
@@ -92,7 +92,7 @@ five.on("gesture.tap", (event) => {
92
92
 
93
93
  ```typescript
94
94
  import * as THREE from "three/webgpu";
95
- import { Five } from "@realsee/five";
95
+ import { Five } from "@realsee/five-webgpu";
96
96
 
97
97
  const five = new Five();
98
98
 
@@ -76,7 +76,7 @@ five.getPixels(
76
76
 
77
77
  ```typescript
78
78
  import * as THREE from 'three';
79
- import { Five } from '@realsee/five';
79
+ import { Five } from '@realsee/five-webgpu';
80
80
 
81
81
  // 假设有一个用于显示的 canvas
82
82
  const magnifierCanvas = document.getElementById('magnifier-canvas') as HTMLCanvasElement;