@realsee/five-webgpu 1.0.0-alpha.13 → 1.0.0-alpha.14

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 (374) hide show
  1. package/_virtual/_rolldown/runtime.js +3 -3
  2. package/docs/assets/hierarchy.js +1 -1
  3. package/docs/assets/navigation.js +1 -1
  4. package/docs/assets/search.js +1 -1
  5. package/docs/classes/index.AdaptiveLuminancePass.html +1 -1
  6. package/docs/classes/index.BoundingMesh.html +1 -1
  7. package/docs/classes/index.Camera.html +1 -1
  8. package/docs/classes/index.EyeDomeLightingPass.html +1 -1
  9. package/docs/classes/index.Five.html +65 -64
  10. package/docs/classes/index.FivePass.html +1 -1
  11. package/docs/classes/index.FiveRenderer.html +4 -4
  12. package/docs/classes/index.FlowingFireworks3DPass.html +1 -1
  13. package/docs/classes/index.FlowingLight2DPass.html +1 -1
  14. package/docs/classes/index.FlowingLight3DPass.html +1 -1
  15. package/docs/classes/index.GaussianBlurPass.html +1 -1
  16. package/docs/classes/index.InternalWebGPURenderer.html +4 -4
  17. package/docs/classes/index.Model.html +1 -1
  18. package/docs/classes/index.ModelScene.html +1 -1
  19. package/docs/classes/index.NetworkSubscribe.html +1 -1
  20. package/docs/classes/index.PBMCustomNode.html +1 -1
  21. package/docs/classes/index.PBMGaussianSplattingNodeMaterial.html +1 -1
  22. package/docs/classes/index.PBMGaussianSplattingObject.html +1 -1
  23. package/docs/classes/index.PBMGaussianSplattingRenderMesh.html +1 -1
  24. package/docs/classes/index.PBMGroup.html +1 -1
  25. package/docs/classes/index.PBMMesh.html +1 -1
  26. package/docs/classes/index.PBMMeshBasicMaterial.html +1 -1
  27. package/docs/classes/index.PBMMeshBasicNodeMaterial.html +1 -1
  28. package/docs/classes/index.PBMMeshPanoOnlyMaterial.html +1 -1
  29. package/docs/classes/index.PBMMeshPanoOnlyNodeMaterial.html +1 -1
  30. package/docs/classes/index.PBMMeshPhongMaterial.html +1 -1
  31. package/docs/classes/index.PBMMeshPhongNodeMaterial.html +1 -1
  32. package/docs/classes/index.PBMMeshPhysicalMaterial.html +1 -1
  33. package/docs/classes/index.PBMMeshPhysicalNodeMaterial.html +1 -1
  34. package/docs/classes/index.PBMPanoFilter.html +1 -1
  35. package/docs/classes/index.PBMPointCloud.html +1 -1
  36. package/docs/classes/index.PBMPointCloudMaterial.html +1 -1
  37. package/docs/classes/index.PBMSkinnedMesh.html +1 -1
  38. package/docs/classes/index.PBMUpdateable.html +1 -1
  39. package/docs/classes/index.PanoCircleMesh.html +1 -1
  40. package/docs/classes/index.PanoCircleMeshCustom.html +1 -1
  41. package/docs/classes/index.PanoCircleMeshSolid.html +1 -1
  42. package/docs/classes/index.Parameter.html +1 -1
  43. package/docs/classes/index.Scene.html +1 -1
  44. package/docs/classes/index.Subscribe.html +1 -1
  45. package/docs/classes/index.Tile3D.html +1 -1
  46. package/docs/classes/index.TileNode.html +1 -1
  47. package/docs/classes/index.TrajectoryNode.html +1 -1
  48. package/docs/classes/index.Work.html +15 -22
  49. package/docs/classes/index.WorkResolvedObserver.html +22 -22
  50. package/docs/functions/index.createWorks.html +1 -1
  51. package/docs/functions/index.parseWork.html +1 -1
  52. package/docs/hierarchy.html +1 -1
  53. package/docs/interfaces/index.AddableObject.html +1 -1
  54. package/docs/interfaces/index.AjaxOptions.html +1 -1
  55. package/docs/interfaces/index.BaseEvent.html +1 -1
  56. package/docs/interfaces/index.Clock.html +1 -1
  57. package/docs/interfaces/index.EventCallback.html +3 -3
  58. package/docs/interfaces/index.GestureEvent.html +1 -1
  59. package/docs/interfaces/index.IPBMMaterial.html +1 -1
  60. package/docs/interfaces/index.ImageOptions.html +1 -1
  61. package/docs/interfaces/index.IntersectEvent.html +1 -1
  62. package/docs/interfaces/index.IntersectMesh.html +1 -1
  63. package/docs/interfaces/index.IntersectMeshInterface.html +1 -1
  64. package/docs/interfaces/index.Intersection.html +1 -1
  65. package/docs/interfaces/index.LooseWorkWithExtrinsics.html +8 -8
  66. package/docs/interfaces/index.ModeChangeEvent.html +1 -1
  67. package/docs/interfaces/index.ModelControllerCustomInitArgs.html +1 -1
  68. package/docs/interfaces/index.ModelEvent.html +1 -1
  69. package/docs/interfaces/index.ModelSceneEvent.html +1 -1
  70. package/docs/interfaces/index.ModelTileEvent.html +1 -1
  71. package/docs/interfaces/index.MovePanoOptions.html +1 -1
  72. package/docs/interfaces/index.NetworkAbortError.html +1 -1
  73. package/docs/interfaces/index.NetworkFirbiddenError.html +1 -1
  74. package/docs/interfaces/index.NetworkOptions.html +1 -1
  75. package/docs/interfaces/index.NetworkProxyError.html +1 -1
  76. package/docs/interfaces/index.NetworkResourceEvent.html +1 -1
  77. package/docs/interfaces/index.NetworkResponseError.html +1 -1
  78. package/docs/interfaces/index.NetworkTimeoutError.html +1 -1
  79. package/docs/interfaces/index.ObjectEvent.html +1 -1
  80. package/docs/interfaces/index.PanoCircleMeshInterface.html +1 -1
  81. package/docs/interfaces/index.PanoEvent.html +1 -1
  82. package/docs/interfaces/index.PanoPrepareEvent.html +1 -1
  83. package/docs/interfaces/index.PanoTextureEvent.html +1 -1
  84. package/docs/interfaces/index.PanoramaControllerCustomInitArgs.html +1 -1
  85. package/docs/interfaces/index.PanoramaLikeControllerCustomInitArgs.html +1 -1
  86. package/docs/interfaces/index.ParameterMaterialValue.html +1 -1
  87. package/docs/interfaces/index.ParameterTilesetValue.html +1 -1
  88. package/docs/interfaces/index.ParameterValue.html +1 -1
  89. package/docs/interfaces/index.Pose.html +1 -1
  90. package/docs/interfaces/index.RenderEvent.html +1 -1
  91. package/docs/interfaces/index.ResolvedParameterValue.html +1 -1
  92. package/docs/interfaces/index.State.html +1 -1
  93. package/docs/interfaces/index.StateEvent.html +1 -1
  94. package/docs/interfaces/index.TextureOptions.html +1 -1
  95. package/docs/interfaces/index.TopviewControllerCustomInitArgs.html +1 -1
  96. package/docs/interfaces/index.VRPanoramaControllerCustomInitArgs.html +1 -1
  97. package/docs/interfaces/index.ViewLayer.html +1 -1
  98. package/docs/interfaces/index.WorkCubeHdrGainmapImage.html +2 -2
  99. package/docs/interfaces/index.WorkCubeImage.html +2 -2
  100. package/docs/interfaces/index.WorkImage.html +5 -5
  101. package/docs/interfaces/index.WorkInitial.html +8 -8
  102. package/docs/interfaces/index.WorkInitialJson.html +2 -2
  103. package/docs/interfaces/index.WorkJson.html +2 -4
  104. package/docs/interfaces/index.WorkModel.html +8 -8
  105. package/docs/interfaces/index.WorkModelJson.html +2 -2
  106. package/docs/interfaces/index.WorkModelLayer.html +6 -6
  107. package/docs/interfaces/index.WorkModelLayerJson.html +2 -2
  108. package/docs/interfaces/index.WorkObserver.html +23 -23
  109. package/docs/interfaces/index.WorkObserverJson.html +2 -2
  110. package/docs/interfaces/index.WorkPanoramaJson.html +2 -2
  111. package/docs/interfaces/index.WorkPanoramasJson.html +2 -2
  112. package/docs/interfaces/index.WorkTile.html +5 -5
  113. package/docs/interfaces/index.WorkVideo.html +4 -4
  114. package/docs/interfaces/index.WorksEvent.html +1 -1
  115. package/docs/interfaces/index.XRControllerEvent.html +1 -1
  116. package/docs/interfaces/index.XRGestureEvent.html +2 -2
  117. package/docs/interfaces/index.XRPanoramaControllerCustomInitArgs.html +1 -1
  118. package/docs/interfaces/index.XRSessionEvent.html +1 -1
  119. package/docs/modules/index.html +1 -1
  120. package/docs/types/index.LegacyEventType.html +3 -3
  121. package/docs/types/index.OutputTextureDataType.html +1 -1
  122. package/docs/types/index.ParseOptions.html +8 -8
  123. package/docs/types/index.PointCloudTransparencyMode.html +2 -0
  124. package/docs/types/index.Works.html +1 -1
  125. package/docs/variables/index.loadAt3d.html +2 -0
  126. package/docs/variables/index.loadDome.html +2 -0
  127. package/docs/variables/index.loadDomez.html +2 -0
  128. package/docs/variables/index.loadGltf.html +2 -0
  129. package/docs/variables/index.loadPbm.html +2 -0
  130. package/docs/variables/index.loadPly.html +2 -0
  131. package/five/application/five.d.ts +3 -2
  132. package/five/chunks/at3d.js +338 -0
  133. package/five/chunks/at3d.mjs +338 -0
  134. package/five/chunks/dome.js +338 -0
  135. package/five/chunks/dome.mjs +338 -0
  136. package/five/chunks/domez.js +338 -0
  137. package/five/chunks/domez.mjs +338 -0
  138. package/five/chunks/fbx.js +338 -0
  139. package/five/chunks/fbx.mjs +338 -0
  140. package/five/chunks/fflate.js +338 -0
  141. package/five/chunks/fflate.mjs +338 -0
  142. package/five/chunks/glTF-helpers.js +804 -0
  143. package/five/chunks/glTF-helpers.mjs +804 -0
  144. package/five/chunks/gltf.js +338 -0
  145. package/five/chunks/gltf.mjs +338 -0
  146. package/five/chunks/imageBitmap.js +338 -0
  147. package/five/chunks/imageBitmap.mjs +338 -0
  148. package/five/chunks/imageSupport.js +338 -0
  149. package/five/chunks/imageSupport.mjs +338 -0
  150. package/five/chunks/lzma.js +383 -0
  151. package/five/chunks/lzma.mjs +383 -0
  152. package/five/chunks/memoryUsage.js +339 -0
  153. package/five/chunks/memoryUsage.mjs +339 -0
  154. package/five/chunks/minimal.js +338 -0
  155. package/five/chunks/minimal.mjs +338 -0
  156. package/five/chunks/pbm.js +338 -0
  157. package/five/chunks/pbm.mjs +338 -0
  158. package/five/chunks/pbmGaussianSplattingObject.js +338 -0
  159. package/five/chunks/pbmGaussianSplattingObject.mjs +338 -0
  160. package/five/chunks/pbmMeshMaterial.js +338 -0
  161. package/five/chunks/pbmMeshMaterial.mjs +338 -0
  162. package/five/chunks/pick.js +338 -0
  163. package/five/chunks/pick.mjs +338 -0
  164. package/five/chunks/ply.js +339 -0
  165. package/five/chunks/ply.mjs +339 -0
  166. package/five/chunks/spz.js +364 -0
  167. package/five/chunks/spz.mjs +364 -0
  168. package/five/core/webglBlendEquationFix.d.ts +41 -0
  169. package/five/index.d.ts +0 -1
  170. package/five/index.js +49 -626
  171. package/five/index.mjs +229 -32052
  172. package/five/model/index.d.ts +18 -6
  173. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +1 -1
  174. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz_2.d.ts +1 -1
  175. package/five/model/loaders/spz.d.ts +1 -2
  176. package/five/model/loaders/spz.worker.d.ts +37 -0
  177. package/five/renderer/five-renderer.d.ts +1 -1
  178. package/five/renderer/index.d.ts +1 -1
  179. package/five/renderer/postprocessing/passes/pass.js +3 -3
  180. package/five/renderer/postprocessing/passes/pass.mjs +3 -3
  181. package/five/renderer/tools/full-screen-quad.js +3 -3
  182. package/five/renderer/tools/full-screen-quad.mjs +3 -3
  183. package/five/texture/videoTextureBridge.d.ts +124 -15
  184. package/five/thirdparty/sha256.d.ts +149 -0
  185. package/five/utils/calculateThreeMouse.js +3 -3
  186. package/five/utils/calculateThreeMouse.mjs +3 -3
  187. package/five/utils/distance.js +3 -3
  188. package/five/utils/distance.mjs +3 -3
  189. package/five/utils/isNil.js +3 -3
  190. package/five/utils/isNil.mjs +3 -3
  191. package/five/utils/memoryUsage.d.ts +1 -1
  192. package/five/utils/uuid.js +3 -3
  193. package/five/utils/uuid.mjs +3 -3
  194. package/five/work/work.d.ts +0 -7
  195. package/five/work/workJsonType.d.ts +0 -2
  196. package/gltf-loader/index.js +3 -3
  197. package/gltf-loader/index.mjs +3 -50
  198. package/line/index.js +3 -3
  199. package/line/index.mjs +3 -88
  200. package/package.json +1 -1
  201. package/plugins/BackgroundPlugin/Controller.js +4 -4
  202. package/plugins/BackgroundPlugin/Controller.mjs +4 -4
  203. package/plugins/BackgroundPlugin/index.js +3 -3
  204. package/plugins/BackgroundPlugin/index.mjs +3 -3
  205. package/plugins/BasePlugin/index.js +3 -3
  206. package/plugins/BasePlugin/index.mjs +3 -3
  207. package/plugins/CSS2DPlugin/Controller.js +3 -3
  208. package/plugins/CSS2DPlugin/Controller.mjs +3 -3
  209. package/plugins/CSS2DPlugin/index.js +3 -3
  210. package/plugins/CSS2DPlugin/index.mjs +3 -3
  211. package/plugins/CSS2DPlugin/style.css_raw.js +4 -4
  212. package/plugins/CSS2DPlugin/style.css_raw.mjs +4 -4
  213. package/plugins/CSS3DPlugin/Controller.js +3 -3
  214. package/plugins/CSS3DPlugin/Controller.mjs +3 -3
  215. package/plugins/CSS3DPlugin/index.js +3 -3
  216. package/plugins/CSS3DPlugin/index.mjs +3 -3
  217. package/plugins/CSS3DPlugin/style.css_raw.js +4 -4
  218. package/plugins/CSS3DPlugin/style.css_raw.mjs +4 -4
  219. package/plugins/FloorplanPlugin/Controller.js +3 -3
  220. package/plugins/FloorplanPlugin/Controller.mjs +3 -3
  221. package/plugins/FloorplanPlugin/index.js +3 -3
  222. package/plugins/FloorplanPlugin/index.mjs +3 -3
  223. package/plugins/FloorplanPlugin/render/assets.js +3 -3
  224. package/plugins/FloorplanPlugin/render/assets.mjs +3 -3
  225. package/plugins/FloorplanPlugin/render/index.js +3 -3
  226. package/plugins/FloorplanPlugin/render/index.mjs +3 -3
  227. package/plugins/FloorplanPlugin/render/isPointInPolygon.js +3 -3
  228. package/plugins/FloorplanPlugin/render/isPointInPolygon.mjs +3 -3
  229. package/plugins/FloorplanPlugin/render/renderFloor.js +3 -3
  230. package/plugins/FloorplanPlugin/render/renderFloor.mjs +3 -3
  231. package/plugins/FloorplanPlugin/render/roomLabelVisibility.js +3 -3
  232. package/plugins/FloorplanPlugin/render/roomLabelVisibility.mjs +3 -3
  233. package/plugins/FloorplanPlugin/render/style.css_raw.js +4 -4
  234. package/plugins/FloorplanPlugin/render/style.css_raw.mjs +4 -4
  235. package/plugins/FloorplanPlugin/utils/changeMode.js +3 -3
  236. package/plugins/FloorplanPlugin/utils/changeMode.mjs +3 -3
  237. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.js +3 -3
  238. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.mjs +3 -3
  239. package/plugins/FloorplanPlugin/utils/correctFiveState.js +3 -3
  240. package/plugins/FloorplanPlugin/utils/correctFiveState.mjs +3 -3
  241. package/plugins/FloorplanPlugin/utils/equal.js +3 -3
  242. package/plugins/FloorplanPlugin/utils/equal.mjs +3 -3
  243. package/plugins/FloorplanPlugin/utils/filter.js +3 -3
  244. package/plugins/FloorplanPlugin/utils/filter.mjs +3 -3
  245. package/plugins/FloorplanPlugin/utils/fiveModelLoad.js +3 -3
  246. package/plugins/FloorplanPlugin/utils/fiveModelLoad.mjs +3 -3
  247. package/plugins/FloorplanPlugin/utils/formatData.js +3 -3
  248. package/plugins/FloorplanPlugin/utils/formatData.mjs +3 -3
  249. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.js +3 -3
  250. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.mjs +3 -3
  251. package/plugins/FloorplanPlugin/utils/formatPosition.js +3 -3
  252. package/plugins/FloorplanPlugin/utils/formatPosition.mjs +3 -3
  253. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.js +3 -3
  254. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.mjs +3 -3
  255. package/plugins/FloorplanPlugin/utils/getPxmm.js +3 -3
  256. package/plugins/FloorplanPlugin/utils/getPxmm.mjs +3 -3
  257. package/plugins/FloorplanPlugin/utils/isTruelyObject.js +3 -3
  258. package/plugins/FloorplanPlugin/utils/isTruelyObject.mjs +3 -3
  259. package/plugins/FloorplanPlugin/utils/nearlyEqual.js +3 -3
  260. package/plugins/FloorplanPlugin/utils/nearlyEqual.mjs +3 -3
  261. package/plugins/FloorplanPlugin/utils/polylabel.js +3 -3
  262. package/plugins/FloorplanPlugin/utils/polylabel.mjs +3 -3
  263. package/plugins/FloorplanPlugin/utils/to.js +3 -3
  264. package/plugins/FloorplanPlugin/utils/to.mjs +3 -3
  265. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.js +3 -3
  266. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.mjs +3 -3
  267. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.js +3 -3
  268. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.mjs +3 -3
  269. package/plugins/Object3DHelperPlugin/Controller.js +3 -3
  270. package/plugins/Object3DHelperPlugin/Controller.mjs +3 -3
  271. package/plugins/Object3DHelperPlugin/Controllers/BaseController.js +3 -3
  272. package/plugins/Object3DHelperPlugin/Controllers/BaseController.mjs +3 -3
  273. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.js +3 -3
  274. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.mjs +3 -3
  275. package/plugins/Object3DHelperPlugin/Controllers/MoveController.js +3 -3
  276. package/plugins/Object3DHelperPlugin/Controllers/MoveController.mjs +3 -3
  277. package/plugins/Object3DHelperPlugin/Controllers/RotateController.js +3 -3
  278. package/plugins/Object3DHelperPlugin/Controllers/RotateController.mjs +3 -3
  279. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.js +3 -3
  280. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.mjs +3 -3
  281. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.js +3 -3
  282. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.mjs +3 -3
  283. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.js +3 -3
  284. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.mjs +3 -3
  285. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.js +3 -3
  286. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.mjs +3 -3
  287. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.js +3 -3
  288. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.mjs +3 -3
  289. package/plugins/Object3DHelperPlugin/constant.js +3 -3
  290. package/plugins/Object3DHelperPlugin/constant.mjs +3 -3
  291. package/plugins/Object3DHelperPlugin/index.js +3 -3
  292. package/plugins/Object3DHelperPlugin/index.mjs +3 -3
  293. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.js +3 -3
  294. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.mjs +3 -3
  295. package/plugins/Object3DHelperPlugin/utils/CenterHandle.js +3 -3
  296. package/plugins/Object3DHelperPlugin/utils/CenterHandle.mjs +3 -3
  297. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.js +3 -3
  298. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.mjs +3 -3
  299. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.js +3 -3
  300. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.mjs +3 -3
  301. package/plugins/Object3DHelperPlugin/utils/cameraHooks.js +3 -3
  302. package/plugins/Object3DHelperPlugin/utils/cameraHooks.mjs +3 -3
  303. package/plugins/Object3DHelperPlugin/utils/direction.js +3 -3
  304. package/plugins/Object3DHelperPlugin/utils/direction.mjs +3 -3
  305. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.js +3 -3
  306. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.mjs +3 -3
  307. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.js +3 -3
  308. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.mjs +3 -3
  309. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.js +3 -3
  310. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.mjs +3 -3
  311. package/plugins/Object3DHelperPlugin/utils/solidGuide.js +3 -3
  312. package/plugins/Object3DHelperPlugin/utils/solidGuide.mjs +3 -3
  313. package/plugins/Object3DHelperPlugin/utils/tipsDom.js +3 -3
  314. package/plugins/Object3DHelperPlugin/utils/tipsDom.mjs +3 -3
  315. package/plugins/PanoAnimePlugin/Controller.js +3 -3
  316. package/plugins/PanoAnimePlugin/Controller.mjs +3 -3
  317. package/plugins/PanoAnimePlugin/index.js +3 -3
  318. package/plugins/PanoAnimePlugin/index.mjs +3 -3
  319. package/plugins/WordPassPlugin/Controller.js +3 -3
  320. package/plugins/WordPassPlugin/Controller.mjs +3 -3
  321. package/plugins/WordPassPlugin/hersheyFont.js +3 -3
  322. package/plugins/WordPassPlugin/hersheyFont.mjs +3 -3
  323. package/plugins/WordPassPlugin/index.js +3 -3
  324. package/plugins/WordPassPlugin/index.mjs +3 -3
  325. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.js +4 -4
  326. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.mjs +4 -4
  327. package/plugins/WordPassPlugin/word-pass.js +3 -3
  328. package/plugins/WordPassPlugin/word-pass.mjs +3 -3
  329. package/plugins/index.js +3 -3
  330. package/plugins/index.mjs +3 -3
  331. package/plugins/thirdParty/CSS2DRenderer.js +3 -3
  332. package/plugins/thirdParty/CSS2DRenderer.mjs +3 -3
  333. package/plugins/thirdParty/CSS3DRenderer.js +3 -3
  334. package/plugins/thirdParty/CSS3DRenderer.mjs +3 -3
  335. package/plugins/thirdParty/doctorstrange-model.js +75 -75
  336. package/plugins/thirdParty/doctorstrange-model.mjs +75 -75
  337. package/plugins/thirdParty/domevents.js +3 -3
  338. package/plugins/thirdParty/domevents.mjs +3 -3
  339. package/plugins/utils/absoluteUrl.js +3 -3
  340. package/plugins/utils/absoluteUrl.mjs +3 -3
  341. package/plugins/utils/calculatePath.js +3 -3
  342. package/plugins/utils/calculatePath.mjs +3 -3
  343. package/plugins/utils/clamp.js +3 -3
  344. package/plugins/utils/clamp.mjs +3 -3
  345. package/plugins/utils/uuid.js +3 -3
  346. package/plugins/utils/uuid.mjs +3 -3
  347. package/react/hooks/useFiveModelReadyState.d.ts +1 -1
  348. package/react/index.js +3 -3
  349. package/react/index.mjs +3 -644
  350. package/sticker/index.js +13 -4
  351. package/sticker/index.mjs +43 -260
  352. package/umd/five-gltf-loader.js +3 -3
  353. package/umd/five-line.js +3 -3
  354. package/umd/five-plugins.js +2 -2
  355. package/umd/five-react.js +2 -2
  356. package/umd/five-sticker.js +13 -4
  357. package/umd/five-vfx.js +2 -2
  358. package/umd/five.js +154 -192
  359. package/vfx/index.js +3 -3
  360. package/vfx/index.mjs +3 -486
  361. package/work-downloader/index.js +3 -3
  362. package/work-downloader/index.mjs +3 -315
  363. package/docs/functions/index.loadAt3d.html +0 -1
  364. package/docs/functions/index.loadDome.html +0 -1
  365. package/docs/functions/index.loadDomez.html +0 -1
  366. package/docs/functions/index.loadGltf.html +0 -1
  367. package/docs/functions/index.loadPbm.html +0 -1
  368. package/docs/functions/index.loadPly.html +0 -10
  369. package/five/certificates/hardware.d.ts +0 -1
  370. package/five/thirdparty/jsrsasign.d.ts +0 -753
  371. package/five/work/_ALLOW_HOST.d.ts +0 -2
  372. package/five/work/keychain.d.ts +0 -5
  373. package/five/work/verify.d.ts +0 -7
  374. package/five/work/workVerify.d.ts +0 -2
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */import{RENDER_ORDER as e}from"../constant.mjs";import{CenterHandle as t}from"../utils/CenterHandle.mjs";import{BaseController as n}from"./BaseController.mjs";import{SolidGuideLine as r}from"../utils/solidGuide.mjs";import{getMouseRaycaster as i}from"../utils/getMouseRaycaster.mjs";import*as a from"three/webgpu";function o(e){let{raycaster:t,line:n,clampToLine:r=!0}=e,i=new a.Plane().setFromNormalAndCoplanarPoint(t.ray.direction.clone().normalize(),new a.Vector3),o=i.projectPoint(n.start,new a.Vector3),s=i.projectPoint(n.end,new a.Vector3),c=new a.Line3(o,s),l=c.closestPointToPoint(t.ray.origin,r,new a.Vector3),u=l.distanceTo(s),d=l.distanceTo(o),f=c.distance();if(u>d&&u>f){let e=-l.distanceTo(o)/f,t=n.start.clone().sub(n.end).normalize();return n.start.clone().sub(t.clone().multiplyScalar(e*n.distance()))}else{let e=l.distanceTo(o)/f;return new a.Vector3().lerpVectors(n.start,n.end,e)}}var s=class extends n{get moveByMouseEnable(){return this._moveByMouse.enabled}constructor(...n){var o,s,c,l,u;super(...n),this.name=`MoveController`,this.solidGuide=new r(this.camera,this.container,(s=(o=this.config)==null?void 0:o.solidGuide)==null?{}:s),this._moveByMouse={enabled:!1},this.dragStart=t=>{if(this.moveByMouseEnable||this.isDragging)return;let n=t==null?void 0:t.intersect;if(!n)return this.dragEnd();let r=(n==null?void 0:n.object).direction;if(!r)return this.dragEnd();let i=new a.Vector3(1,0,0),o=new a.Vector3(0,1,0),s=new a.Vector3(0,0,1),c=(()=>{switch(r){case`x`:return i;case`y`:return o;case`z`:return s;case`xy`:case`xz`:case`yz`:case`plane`:return}})(),l=n.point.clone();if(r===`xy`||r===`xz`||r===`yz`){let e=(()=>{switch(r){case`xy`:return s;case`xz`:return o;case`yz`:return i}})(),t=new a.Plane().setFromNormalAndCoplanarPoint(e,l),n=l.clone();this.startInfo={draggingDirection:r,startVectorProject:n,line:new a.Line3(n.clone(),n.clone()),plane:t}}else if(r===`plane`){let e=this.camera.position.clone(),t=l.clone(),n=t.clone().sub(e).normalize(),i=new a.Plane().setFromNormalAndCoplanarPoint(n,t),o=t.clone();this.startInfo={draggingDirection:r,startVectorProject:o,line:new a.Line3(o.clone(),o.clone()),plane:i}}else{if(!c)return this.dragEnd();let t=new a.Line3(l.clone().sub(c.normalize()),l.clone().add(c.normalize()));this.startInfo={draggingDirection:r,startVectorProject:l,line:t};try{let t=c.clone().normalize(),n=this.helperObject3D.getWorldPosition(new a.Vector3),r=this.solidGuide.createSolidLine(n,t,{color:16777215,renderOrder:e.DRAG_GUIDE_LINE});this.scene.add(r),this.dragGuideLine=r}catch(e){}}let u=(()=>{switch(r){case`plane`:return[];case`xy`:return[`x`,`y`,`xy`];case`xz`:return[`x`,`z`,`xz`];case`yz`:return[`y`,`z`,`yz`];default:return[r]}})();this.helperObject3D.showDraggingHelper(u),this.hooks.emit(`moveStart`,r),this.isDragging=!0,this.setTipsText(this.originObject3D.position),this.setTipsPosition(l)},this.dragging=e=>{if(!this.isDragging||!this.startInfo)return;let t=`touches`in e?e.touches[0].clientX:e.x,n=`touches`in e?e.touches[0].clientY:e.y,r=i(this.camera,{x:t,y:n},this.container);return r?(this.move(r),!1):this.dragEnd()},this.dragEnd=()=>{if(this.isDragging){if(this.startInfo=void 0,this.isDragging=!1,this.dragGuideLine){this.scene.remove(this.dragGuideLine),this.dragGuideLine.geometry.dispose();let e=this.dragGuideLine.material;Array.isArray(e)?e.forEach(e=>e.dispose()):e.dispose(),this.dragGuideLine=void 0}this.helperObject3D.show(),this.hooks.emit(`moveEnd`)}};let d=this.helperObject3D;if(this.hoverListener([d.xArrow,d.yArrow,d.zArrow,(c=d.xyPlane)==null?void 0:c.handle,(l=d.xzPlane)==null?void 0:l.handle,(u=d.yzPlane)==null?void 0:u.handle]),d.centerHandle&&d.centerHandle instanceof t){let e=d.centerHandle,t=e.cube;this.domEvents.addEventListener(t,`mouseover`,()=>{this.isDragging||(Array.isArray(t.material)&&t.material.forEach(e=>{e.color.set(16777215)}),this.render())}),this.domEvents.addEventListener(t,`mouseout`,()=>{this.isDragging||(e.update(this.camera),this.render())})}let f=this.show.bind(this),p=this.hide.bind(this),m=()=>{this.helperObject3D.update(this.camera),this.isDragging&&this.updateDragGuideLineScale(),this.render()};m(),this.domEvents.addEventListener(this.helperObject3D,`mousedown`,this.dragStart),document.addEventListener(`mousemove`,this.dragging),document.addEventListener(`mouseup`,this.dragEnd),this.domEvents.addEventListener(this.helperObject3D,`touchstart`,this.dragStart),document.addEventListener(`touchmove`,this.dragging),document.addEventListener(`touchend`,this.dragEnd),this.hooks.on(`rotateStart`,p),this.hooks.on(`rotateEnd`,f),this.hooks.on(`scaleStart`,p),this.hooks.on(`scaleEnd`,f),this.hooks.on(`moveByMouseEnable`,p),this.hooks.on(`moveByMouseDisable`,f),this.hooks.on(`updateOtherHelpers`,e=>{this.helperObject3D.update(e.camera),this.render()}),this.cameraHooks.on(`cameraUpdate`,m),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,`mousedown`,this.dragStart),document.removeEventListener(`mousemove`,this.dragging),document.removeEventListener(`mouseup`,this.dragEnd),this.domEvents.removeEventListener(this.helperObject3D,`touchstart`,this.dragStart),document.removeEventListener(`touchmove`,this.dragging),document.removeEventListener(`touchend`,this.dragEnd),this.hooks.off(`rotateStart`,p),this.hooks.off(`rotateEnd`,f),this.hooks.off(`scaleStart`,p),this.hooks.off(`scaleEnd`,f),this.hooks.off(`moveByMouseEnable`,p),this.hooks.off(`moveByMouseDisable`,f),this.hooks.off(`updateOtherHelpers`),this.cameraHooks.off(`cameraUpdate`,m)}),this.moveByMouseEnable&&this.moveByMouse()}dispose(){var e;super.dispose(),(e=this.disposers)==null||e.forEach(e=>e==null?void 0:e())}moveByMouse(e){this._moveByMouse={enabled:!0,useFaceNormal:e==null?void 0:e.useFaceNormal},this.preventTapDefaultEvent=!0;let t=this.handleMouseDown.bind(this),n=this.handleMouseUp.bind(this);this.hooks.emit(`moveByMouseEnable`),setTimeout(()=>{this.container.addEventListener(`mousedown`,t),this.container.addEventListener(`mouseup`,n)}),this.mousedownEventListenerDisposer=()=>{this.container.removeEventListener(`mousedown`,t),this.container.removeEventListener(`mouseup`,n)}}disableMoveByMouse(){var e;this._moveByMouse={enabled:!1},this.preventTapDefaultEvent=!1,this.hooks.emit(`moveByMouseDisable`),(e=this.mousedownEventListenerDisposer)==null||e.call(this)}onIntersectionOnModelUpdate(e){var t,n,r;if(!this.moveByMouseEnable)return;let{point:i,face:o}=e;if(!this.hooks.emit(`wantToMove`,i)){if(this.originObject3D.position.copy(i),(this._moveByMouse.useFaceNormal===!0||typeof this._moveByMouse.useFaceNormal==`object`&&this._moveByMouse.useFaceNormal.enable!==!1)&&o!=null&&o.normal){let e=typeof this._moveByMouse.useFaceNormal==`object`&&this._moveByMouse.useFaceNormal.alignmentVector?this._moveByMouse.useFaceNormal.alignmentVector:{x:0,y:1,z:0},i=new a.Vector3((t=e.x)==null?0:t,(n=e.y)==null?0:n,(r=e.z)==null?0:r),s=typeof this._moveByMouse.useFaceNormal==`object`&&this._moveByMouse.useFaceNormal.fixedFaceNormal?this._moveByMouse.useFaceNormal.fixedFaceNormal(o.normal):o.normal;this.originObject3D.quaternion.setFromUnitVectors(i,s),this.internalHooks.emit(`setObjectRotate`,this.originObject3D.quaternion.clone(),new a.Vector3)}this.internalHooks.emit(`setObjectPosition`,i),this.hooks.emit(`move`,i)}}handleMouseDown(e){let{x:t,y:n}=e;this.mouseInfo={x:t,y:n,mouseDownTimestamp:Date.now()}}handleMouseUp(e){if(!this.mouseInfo)return;let{x:t,y:n}=e;this.mouseInfo.x===t&&this.mouseInfo.y===n&&Date.now()-this.mouseInfo.mouseDownTimestamp<500&&(this.disableMoveByMouse(),this.mouseInfo=void 0)}updateDragGuideLineScale(){if(!this.dragGuideLine||!this.startInfo)return;let{line:e}=this.startInfo,t=e.end.clone().sub(e.start).normalize();if(t.lengthSq()<1e-6)return;let n=this.helperObject3D.getWorldPosition(new a.Vector3);this.solidGuide.updateSolidLine(this.dragGuideLine,n,t)}move(e){if(!this.startInfo)return this.dragEnd();let{line:t,startVectorProject:n}=this.startInfo,r=this.originObject3D,i=this.startInfo.draggingDirection===`plane`||this.startInfo.draggingDirection===`xy`||this.startInfo.draggingDirection===`xz`||this.startInfo.draggingDirection===`yz`,s;if(i){let t=this.startInfo.plane;if(!t)return;let n=new a.Vector3,r=t.normal.dot(e.ray.direction);if(Math.abs(r)<1e-6)return;let i=-(t.normal.dot(e.ray.origin)+t.constant)/r;if(i<0)return;n.copy(e.ray.origin.clone().add(e.ray.direction.clone().multiplyScalar(i))),s=n}else s=o({raycaster:e,line:t,clampToLine:!1});let c=r.position.clone(),l=s.clone().sub(n),u=new a.Matrix4;u.setPosition(l);let d=r.position.clone().applyMatrix4(u);if(this.hooks.emit(`wantToMove`,d))return;let f=d.clone();this.hooks.emit(`moveBefore`,f);let p=new a.Matrix4;p.setPosition(f.clone().sub(c)),r.position.copy(f),this.setTipsText(f),this.setTipsPosition(f),n.copy(s),this.internalHooks.emit(`applyObjectPosition`,{matrix:p}),this.hooks.emit(`move`,f)}setTipsText(e){var t;let n=(t=this.helperObject3D.moveTips)==null?void 0:t.element;if(!n||!this.startInfo)return;let r=this.startInfo.draggingDirection,i=e=>e.toFixed(3);switch(r){case`x`:n.innerText=`x: ${i(e.x)}`;break;case`y`:n.innerText=`y: ${i(e.y)}`;break;case`z`:n.innerText=`z: ${i(e.z)}`;break;case`xy`:n.innerText=`x: ${i(e.x)} y: ${i(e.y)}`;break;case`xz`:n.innerText=`x: ${i(e.x)} z: ${i(e.z)}`;break;case`yz`:n.innerText=`y: ${i(e.y)} z: ${i(e.z)}`;break;case`plane`:n.innerText=`x: ${i(e.x)} y: ${i(e.y)} z: ${i(e.z)}`;break}}setTipsPosition(e){let t=this.helperObject3D.moveTips;if(!t)return;let{x:n,y:r,z:i}=this.helperObject3D.getWorldPosition(new a.Vector3).clone().project(this.camera);if(i>1){t.hide();return}let o=this.container.getBoundingClientRect(),s=(n+1)/2*o.width,c=(-r+1)/2*o.height;t.setLeftTop(s+`px`,c+`px`)}};export{s as MoveController,o as rayOnLine};
338
+ */import{RENDER_ORDER}from"../constant.mjs";import{CenterHandle}from"../utils/CenterHandle.mjs";import{BaseController}from"./BaseController.mjs";import{SolidGuideLine}from"../utils/solidGuide.mjs";import{getMouseRaycaster}from"../utils/getMouseRaycaster.mjs";import*as THREE from"three/webgpu";function rayOnLine(params){let{raycaster,line,clampToLine=!0}=params,cameraPlane=new THREE.Plane().setFromNormalAndCoplanarPoint(raycaster.ray.direction.clone().normalize(),new THREE.Vector3),lineStartPointOnPlane=cameraPlane.projectPoint(line.start,new THREE.Vector3),lineEndPointOnPlane=cameraPlane.projectPoint(line.end,new THREE.Vector3),lineOnPlane=new THREE.Line3(lineStartPointOnPlane,lineEndPointOnPlane),intersectionPointOnLineOnPlane=lineOnPlane.closestPointToPoint(raycaster.ray.origin,clampToLine,new THREE.Vector3),pointToEndDistance=intersectionPointOnLineOnPlane.distanceTo(lineEndPointOnPlane),pointToStartDistance=intersectionPointOnLineOnPlane.distanceTo(lineStartPointOnPlane),lineOnPlaneDistance=lineOnPlane.distance();if(pointToEndDistance>pointToStartDistance&&pointToEndDistance>lineOnPlaneDistance){let distanceScale=-intersectionPointOnLineOnPlane.distanceTo(lineStartPointOnPlane)/lineOnPlaneDistance,lineVector=line.start.clone().sub(line.end).normalize();return line.start.clone().sub(lineVector.clone().multiplyScalar(distanceScale*line.distance()))}else{let distanceScale=intersectionPointOnLineOnPlane.distanceTo(lineStartPointOnPlane)/lineOnPlaneDistance;return new THREE.Vector3().lerpVectors(line.start,line.end,distanceScale)}}var MoveController=class extends BaseController{get moveByMouseEnable(){return this._moveByMouse.enabled}constructor(...params){var _a,_b,_c,_d,_e;super(...params),this.name=`MoveController`,this.solidGuide=new SolidGuideLine(this.camera,this.container,(_b=(_a=this.config)==null?void 0:_a.solidGuide)==null?{}:_b),this._moveByMouse={enabled:!1},this.dragStart=params=>{if(this.moveByMouseEnable||this.isDragging)return;let intersect=params==null?void 0:params.intersect;if(!intersect)return this.dragEnd();let draggingDirection=(intersect==null?void 0:intersect.object).direction;if(!draggingDirection)return this.dragEnd();let directionX=new THREE.Vector3(1,0,0),directionY=new THREE.Vector3(0,1,0),directionZ=new THREE.Vector3(0,0,1),directionVector=(()=>{switch(draggingDirection){case`x`:return directionX;case`y`:return directionY;case`z`:return directionZ;case`xy`:case`xz`:case`yz`:case`plane`:return}})(),startIntersect=intersect.point.clone();if(draggingDirection===`xy`||draggingDirection===`xz`||draggingDirection===`yz`){let planeNormal=(()=>{switch(draggingDirection){case`xy`:return directionZ;case`xz`:return directionY;case`yz`:return directionX}})(),plane=new THREE.Plane().setFromNormalAndCoplanarPoint(planeNormal,startIntersect),startProject=startIntersect.clone();this.startInfo={draggingDirection,startVectorProject:startProject,line:new THREE.Line3(startProject.clone(),startProject.clone()),plane}}else if(draggingDirection===`plane`){let cameraPosition=this.camera.position.clone(),clickPoint=startIntersect.clone(),viewDirection=clickPoint.clone().sub(cameraPosition).normalize(),plane=new THREE.Plane().setFromNormalAndCoplanarPoint(viewDirection,clickPoint),startProject=clickPoint.clone();this.startInfo={draggingDirection,startVectorProject:startProject,line:new THREE.Line3(startProject.clone(),startProject.clone()),plane}}else{if(!directionVector)return this.dragEnd();let line=new THREE.Line3(startIntersect.clone().sub(directionVector.normalize()),startIntersect.clone().add(directionVector.normalize()));this.startInfo={draggingDirection,startVectorProject:startIntersect,line};try{let dirNormalized=directionVector.clone().normalize(),center=this.helperObject3D.getWorldPosition(new THREE.Vector3),line=this.solidGuide.createSolidLine(center,dirNormalized,{color:16777215,renderOrder:RENDER_ORDER.DRAG_GUIDE_LINE});this.scene.add(line),this.dragGuideLine=line}catch(_a){}}let directionsToShow=(()=>{switch(draggingDirection){case`plane`:return[];case`xy`:return[`x`,`y`,`xy`];case`xz`:return[`x`,`z`,`xz`];case`yz`:return[`y`,`z`,`yz`];default:return[draggingDirection]}})();this.helperObject3D.showDraggingHelper(directionsToShow),this.hooks.emit(`moveStart`,draggingDirection),this.isDragging=!0,this.setTipsText(this.originObject3D.position),this.setTipsPosition(startIntersect)},this.dragging=point=>{if(!this.isDragging||!this.startInfo)return;let x=`touches`in point?point.touches[0].clientX:point.x,y=`touches`in point?point.touches[0].clientY:point.y,ray=getMouseRaycaster(this.camera,{x,y},this.container);return ray?(this.move(ray),!1):this.dragEnd()},this.dragEnd=()=>{if(this.isDragging){if(this.startInfo=void 0,this.isDragging=!1,this.dragGuideLine){this.scene.remove(this.dragGuideLine),this.dragGuideLine.geometry.dispose();let material=this.dragGuideLine.material;Array.isArray(material)?material.forEach(m=>m.dispose()):material.dispose(),this.dragGuideLine=void 0}this.helperObject3D.show(),this.hooks.emit(`moveEnd`)}};let helper=this.helperObject3D;if(this.hoverListener([helper.xArrow,helper.yArrow,helper.zArrow,(_c=helper.xyPlane)==null?void 0:_c.handle,(_d=helper.xzPlane)==null?void 0:_d.handle,(_e=helper.yzPlane)==null?void 0:_e.handle]),helper.centerHandle&&helper.centerHandle instanceof CenterHandle){let centerHandle=helper.centerHandle,centerHandleMesh=centerHandle.cube;this.domEvents.addEventListener(centerHandleMesh,`mouseover`,()=>{this.isDragging||(Array.isArray(centerHandleMesh.material)&&centerHandleMesh.material.forEach(mat=>{mat.color.set(16777215)}),this.render())}),this.domEvents.addEventListener(centerHandleMesh,`mouseout`,()=>{this.isDragging||(centerHandle.update(this.camera),this.render())})}let show=this.show.bind(this),hide=this.hide.bind(this),updateHelperByCamera=()=>{this.helperObject3D.update(this.camera),this.isDragging&&this.updateDragGuideLineScale(),this.render()};updateHelperByCamera(),this.domEvents.addEventListener(this.helperObject3D,`mousedown`,this.dragStart),document.addEventListener(`mousemove`,this.dragging),document.addEventListener(`mouseup`,this.dragEnd),this.domEvents.addEventListener(this.helperObject3D,`touchstart`,this.dragStart),document.addEventListener(`touchmove`,this.dragging),document.addEventListener(`touchend`,this.dragEnd),this.hooks.on(`rotateStart`,hide),this.hooks.on(`rotateEnd`,show),this.hooks.on(`scaleStart`,hide),this.hooks.on(`scaleEnd`,show),this.hooks.on(`moveByMouseEnable`,hide),this.hooks.on(`moveByMouseDisable`,show),this.hooks.on(`updateOtherHelpers`,params=>{this.helperObject3D.update(params.camera),this.render()}),this.cameraHooks.on(`cameraUpdate`,updateHelperByCamera),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,`mousedown`,this.dragStart),document.removeEventListener(`mousemove`,this.dragging),document.removeEventListener(`mouseup`,this.dragEnd),this.domEvents.removeEventListener(this.helperObject3D,`touchstart`,this.dragStart),document.removeEventListener(`touchmove`,this.dragging),document.removeEventListener(`touchend`,this.dragEnd),this.hooks.off(`rotateStart`,hide),this.hooks.off(`rotateEnd`,show),this.hooks.off(`scaleStart`,hide),this.hooks.off(`scaleEnd`,show),this.hooks.off(`moveByMouseEnable`,hide),this.hooks.off(`moveByMouseDisable`,show),this.hooks.off(`updateOtherHelpers`),this.cameraHooks.off(`cameraUpdate`,updateHelperByCamera)}),this.moveByMouseEnable&&this.moveByMouse()}dispose(){var _a;super.dispose(),(_a=this.disposers)==null||_a.forEach(d=>d==null?void 0:d())}moveByMouse(params){this._moveByMouse={enabled:!0,useFaceNormal:params==null?void 0:params.useFaceNormal},this.preventTapDefaultEvent=!0;let mousedownListener=this.handleMouseDown.bind(this),mouseupListener=this.handleMouseUp.bind(this);this.hooks.emit(`moveByMouseEnable`),setTimeout(()=>{this.container.addEventListener(`mousedown`,mousedownListener),this.container.addEventListener(`mouseup`,mouseupListener)}),this.mousedownEventListenerDisposer=()=>{this.container.removeEventListener(`mousedown`,mousedownListener),this.container.removeEventListener(`mouseup`,mouseupListener)}}disableMoveByMouse(){var _a;this._moveByMouse={enabled:!1},this.preventTapDefaultEvent=!1,this.hooks.emit(`moveByMouseDisable`),(_a=this.mousedownEventListenerDisposer)==null||_a.call(this)}onIntersectionOnModelUpdate(intersection){var _a,_b,_c;if(!this.moveByMouseEnable)return;let{point,face}=intersection;if(!this.hooks.emit(`wantToMove`,point)){if(this.originObject3D.position.copy(point),(this._moveByMouse.useFaceNormal===!0||typeof this._moveByMouse.useFaceNormal==`object`&&this._moveByMouse.useFaceNormal.enable!==!1)&&face!=null&&face.normal){let alignment=typeof this._moveByMouse.useFaceNormal==`object`&&this._moveByMouse.useFaceNormal.alignmentVector?this._moveByMouse.useFaceNormal.alignmentVector:{x:0,y:1,z:0},alignmentVector3=new THREE.Vector3((_a=alignment.x)==null?0:_a,(_b=alignment.y)==null?0:_b,(_c=alignment.z)==null?0:_c),faceNormal=typeof this._moveByMouse.useFaceNormal==`object`&&this._moveByMouse.useFaceNormal.fixedFaceNormal?this._moveByMouse.useFaceNormal.fixedFaceNormal(face.normal):face.normal;this.originObject3D.quaternion.setFromUnitVectors(alignmentVector3,faceNormal),this.internalHooks.emit(`setObjectRotate`,this.originObject3D.quaternion.clone(),new THREE.Vector3)}this.internalHooks.emit(`setObjectPosition`,point),this.hooks.emit(`move`,point)}}handleMouseDown(event){let{x,y}=event;this.mouseInfo={x,y,mouseDownTimestamp:Date.now()}}handleMouseUp(event){if(!this.mouseInfo)return;let{x,y}=event;this.mouseInfo.x===x&&this.mouseInfo.y===y&&Date.now()-this.mouseInfo.mouseDownTimestamp<500&&(this.disableMoveByMouse(),this.mouseInfo=void 0)}updateDragGuideLineScale(){if(!this.dragGuideLine||!this.startInfo)return;let{line}=this.startInfo,dirNormalized=line.end.clone().sub(line.start).normalize();if(dirNormalized.lengthSq()<1e-6)return;let center=this.helperObject3D.getWorldPosition(new THREE.Vector3);this.solidGuide.updateSolidLine(this.dragGuideLine,center,dirNormalized)}move(raycaster){if(!this.startInfo)return this.dragEnd();let{line,startVectorProject}=this.startInfo,object=this.originObject3D,isPlane=this.startInfo.draggingDirection===`plane`||this.startInfo.draggingDirection===`xy`||this.startInfo.draggingDirection===`xz`||this.startInfo.draggingDirection===`yz`,currentVectorProject;if(isPlane){let plane=this.startInfo.plane;if(!plane)return;let projected=new THREE.Vector3,denom=plane.normal.dot(raycaster.ray.direction);if(Math.abs(denom)<1e-6)return;let t=-(plane.normal.dot(raycaster.ray.origin)+plane.constant)/denom;if(t<0)return;projected.copy(raycaster.ray.origin.clone().add(raycaster.ray.direction.clone().multiplyScalar(t))),currentVectorProject=projected}else currentVectorProject=rayOnLine({raycaster,line,clampToLine:!1});let beforePosition=object.position.clone(),offsetVector=currentVectorProject.clone().sub(startVectorProject),transform=new THREE.Matrix4;transform.setPosition(offsetVector);let newPosition=object.position.clone().applyMatrix4(transform);if(this.hooks.emit(`wantToMove`,newPosition))return;let finalPosition=newPosition.clone();this.hooks.emit(`moveBefore`,finalPosition);let finalTransform=new THREE.Matrix4;finalTransform.setPosition(finalPosition.clone().sub(beforePosition)),object.position.copy(finalPosition),this.setTipsText(finalPosition),this.setTipsPosition(finalPosition),startVectorProject.copy(currentVectorProject),this.internalHooks.emit(`applyObjectPosition`,{matrix:finalTransform}),this.hooks.emit(`move`,finalPosition)}setTipsText(position){var _a;let element=(_a=this.helperObject3D.moveTips)==null?void 0:_a.element;if(!element||!this.startInfo)return;let dir=this.startInfo.draggingDirection,fmt=n=>n.toFixed(3);switch(dir){case`x`:element.innerText=`x: ${fmt(position.x)}`;break;case`y`:element.innerText=`y: ${fmt(position.y)}`;break;case`z`:element.innerText=`z: ${fmt(position.z)}`;break;case`xy`:element.innerText=`x: ${fmt(position.x)} y: ${fmt(position.y)}`;break;case`xz`:element.innerText=`x: ${fmt(position.x)} z: ${fmt(position.z)}`;break;case`yz`:element.innerText=`y: ${fmt(position.y)} z: ${fmt(position.z)}`;break;case`plane`:element.innerText=`x: ${fmt(position.x)} y: ${fmt(position.y)} z: ${fmt(position.z)}`;break}}setTipsPosition(position){let moveTips=this.helperObject3D.moveTips;if(!moveTips)return;let{x,y,z}=this.helperObject3D.getWorldPosition(new THREE.Vector3).clone().project(this.camera);if(z>1){moveTips.hide();return}let rect=this.container.getBoundingClientRect(),px=(x+1)/2*rect.width,py=(-y+1)/2*rect.height;moveTips.setLeftTop(px+`px`,py+`px`)}};export{MoveController,rayOnLine};
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */const e=require("../../../_virtual/_rolldown/runtime.js"),t=require("../utils/setObjectQuaternion.js"),n=require("../constant.js"),r=require("./BaseController.js"),i=require("../utils/solidGuide.js"),a=require("../utils/getMouseRaycaster.js");let o=require("three/webgpu");o=e.__toESM(o,1);var s=new o.Quaternion,c=class extends r.BaseController{get rotateCenter(){return this.helperObject3D.position.clone()}constructor(...e){var t,n,r;super(...e),this.name=`RotateController`,this.solidGuide=new i.SolidGuideLine(this.camera,this.container),this.snapGuideLines=[];let a=this.helperObject3D;this.hoverListener([(t=a.xCircle)==null?void 0:t.circle,(n=a.yCircle)==null?void 0:n.circle,(r=a.zCircle)==null?void 0:r.circle].filter(Boolean));let o=this.dragStart.bind(this),s=this.dragging.bind(this),c=this.dragEnd.bind(this),l=this.show.bind(this),u=this.hide.bind(this),d=()=>{this.helperObject3D.update(this.camera),this.render()};d(),this.domEvents.addEventListener(this.helperObject3D,`mousedown`,o),document.addEventListener(`mousemove`,s),document.addEventListener(`mouseup`,c),this.domEvents.addEventListener(this.helperObject3D,`touchstart`,o),document.addEventListener(`touchmove`,s),document.addEventListener(`touchend`,c),this.hooks.on(`moveStart`,u),this.hooks.on(`moveEnd`,l),this.hooks.on(`scaleStart`,u),this.hooks.on(`scaleEnd`,l),this.hooks.on(`moveByMouseEnable`,u),this.hooks.on(`moveByMouseDisable`,l),this.hooks.on(`updateOtherHelpers`,e=>{this.helperObject3D.update(e.camera),this.render()}),this.cameraHooks.on(`cameraUpdate`,d),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,`mousedown`,o),document.removeEventListener(`mousemove`,s),document.removeEventListener(`mouseup`,c),this.domEvents.removeEventListener(this.helperObject3D,`touchstart`,o),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),this.hooks.off(`moveStart`,u),this.hooks.off(`moveEnd`,l),this.hooks.off(`scaleStart`,u),this.hooks.off(`scaleEnd`,l),this.hooks.off(`moveByMouseEnable`,u),this.hooks.off(`moveByMouseDisable`,l),this.hooks.off(`updateOtherHelpers`),this.cameraHooks.off(`cameraUpdate`,d)})}setRotateAngle(e){let{x:n=0,y:r=0,z:i=0}=e,a=new o.Euler(o.MathUtils.degToRad(n),o.MathUtils.degToRad(r),o.MathUtils.degToRad(i)),s=new o.Quaternion().setFromEuler(a);if(this.hooks.emit(`wantToRotate`,s))return;let{originObject3D:c,rotateCenter:l}=this;t.default(c,s,l),this.internalHooks.emit(`setObjectRotate`,s,l),this.hooks.emit(`rotate`,s),this.render()}getEulerAngle(e,t){let{originObject3D:n}=this,r=new o.Euler().setFromQuaternion(n.quaternion),i={x:o.MathUtils.radToDeg(r.x),y:o.MathUtils.radToDeg(r.y),z:o.MathUtils.radToDeg(r.z)},a={x:e===`x`?t:i.x,y:e===`y`?t:i.y,z:e===`z`?t:i.z},s=new o.Euler(o.MathUtils.degToRad(a.x),o.MathUtils.degToRad(a.y),o.MathUtils.degToRad(a.z));return new o.Quaternion().setFromEuler(s)}onApplyOriginObjectRotate(e){this.isDragging||super.onApplyOriginObjectRotate(e)}onApplyOriginObjectScale(e){}dragStart(e){if(this.isDragging)return;this.helperObject3D.update(this.camera);let t=e==null?void 0:e.intersect;if(!t)return this.dragEnd();let n=(t==null?void 0:t.object).direction;if(!n)return this.dragEnd();let r=t.point;this.setTipsAngle(0);let i=r.clone();i.y+=.2,this.setTipsPosition(i);let a=new o.Quaternion,c=n===`x`?new o.Vector3(1,0,0):n===`y`?new o.Vector3(0,1,0):n===`z`?new o.Vector3(0,0,1):new o.Vector3(0,1,0),l=new o.Plane().setFromNormalAndCoplanarPoint(c,r),u=l.projectPoint(r.clone(),new o.Vector3).clone().sub(this.rotateCenter),d=this.getAngleHelper(n);if(!d)return this.dragEnd();let f=u.angleTo(d.baseAxes.clone().applyQuaternion(a)),p=d.offsetAngle(f);this.setAngleHelperStart(n,p),this.setAngleHelperLength(n,0),this.startInfo={direction:n,startVector:u,directionVector:c,plane:l,angleHelper:d,angle:0,helperQuaternion:a.clone(),startQuaternion:this.originObject3D.quaternion.clone()},s=new o.Quaternion,this.helperObject3D.showDraggingHelper([n]),this.hooks.emit(`rotateStart`,n),this.isDragging=!0}getMatrix(){var e,t;return(t=(e=this.originObject3D)==null?void 0:e.ext)==null?void 0:t.matrix}getMatrixAngle(e,t){let n;if(e&&e.isMatrix4){n=new o.Quaternion,e.decompose(new o.Vector3,n,new o.Vector3);let r=new o.Euler().setFromQuaternion(n);if(t===`x`)return Math.round(o.MathUtils.radToDeg(r.z));if(t===`y`)return Math.round(o.MathUtils.radToDeg(r.y));if(t===`z`)return Math.round(o.MathUtils.radToDeg(r.x))}}parseAngleByDirection(e){var t,n;let r=(n=(t=this.originObject3D)==null?void 0:t.ext)==null?void 0:n.matrix,i;if(r&&r.isMatrix4){i=new o.Quaternion,r.decompose(new o.Vector3,i,new o.Vector3);let t=new o.Euler().setFromQuaternion(i);if(e===`x`)return Math.round(o.MathUtils.radToDeg(t.z));if(e===`y`)return Math.round(o.MathUtils.radToDeg(t.y));if(e===`z`)return Math.round(o.MathUtils.radToDeg(t.x))}}dragging(e){if(!this.isDragging)return;let t=`touches`in e?e.touches[0].clientX:e.x,n=`touches`in e?e.touches[0].clientY:e.y,r=a.getMouseRaycaster(this.camera,{x:t,y:n},this.container);return r?(this.rotate(r),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();let{startVector:t,plane:n,angleHelper:r,direction:i,helperQuaternion:a}=this.startInfo,{originObject3D:c}=this,l=e.ray.intersectPlane(n,new o.Vector3);if(!l)return;let u=this.rotateCenter.clone(),d=n.projectPoint(l.clone(),new o.Vector3).clone().sub(u),f=this.startInfo.directionVector.clone().normalize();d=d.clone().projectOnPlane(f).normalize().multiplyScalar(d.length());let p=new o.Quaternion().setFromUnitVectors(t.clone().normalize(),d.clone().normalize()),m=c.quaternion.clone().premultiply(p);if(t.angleTo(d)===0||this.hooks.emit(`wantToRotate`,m))return;let h=new o.Euler().setFromQuaternion(new o.Quaternion().setFromUnitVectors(t.clone().normalize().applyQuaternion(a.clone().invert()),d.clone().normalize().applyQuaternion(a.clone().invert())),`${i.toUpperCase()}${`XZY`.replace(i.toUpperCase(),``)}`)[i]*r.angleDirection,g=this.startInfo.angle,_=g+h,v=Math.PI/2,y=o.MathUtils.degToRad(5),b=o.MathUtils.degToRad(10),x=new o.Quaternion().setFromAxisAngle(f,_),S=this.startInfo.startQuaternion.clone().premultiply(x),C=this.extractAxisAngle(S,f),w=Math.round(C/v)*v,T=Math.abs(C-w);if(Math.abs(_)>b&&T<y){let e=w-C;_+=e}let E=_-g;this.startInfo.angle=_;let D=Math.abs(E)<1e-6&&Math.abs(h)>1e-6,O=this.snapGuideLines.length>0;D&&!O?this.showSnapGuideLines(i,u):!D&&O&&this.removeSnapGuideLines(),this.setAngleHelperLength(i,this.startInfo.angle),this.setTipsAngle(o.MathUtils.radToDeg(this.startInfo.angle));let k=new o.Quaternion().setFromAxisAngle(f,E);if(u){let e=new o.Vector3().subVectors(c.position,u).applyQuaternion(k).add(u);c.position.copy(e)}c.applyQuaternion(k),s.premultiply(k),this.internalHooks.emit(`applyObjectRotate`,{quaternion:k,origin:u}),this.hooks.emit(`rotate`,c.quaternion),D||(this.startInfo.startVector=d)}dragEnd(){var e;this.isDragging&&(this.removeSnapGuideLines(),(e=this.startInfo)!=null&&e.lineMeshes&&this.startInfo.lineMeshes.forEach(e=>{this.scene.remove(e),e.geometry.dispose(),e.material instanceof o.Material&&e.material.dispose()}),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.updateOtherHelpers(),this.hooks.emit(`rotateEnd`))}updateOtherHelpers(){this.hooks.emit(`updateOtherHelpers`,{camera:this.camera})}getAngleHelper(e){var t,n,r;switch(e){case`x`:return(t=this.helperObject3D.xCircle)==null?void 0:t.angleSector;case`y`:return(n=this.helperObject3D.yCircle)==null?void 0:n.angleSector;case`z`:return(r=this.helperObject3D.zCircle)==null?void 0:r.angleSector}}setAngleHelperStart(e,t){let n=this.getAngleHelper(e);if(!n){console.warn(`angleHelper is undefined`);return}if(n instanceof o.Mesh&&n.geometry instanceof o.CircleGeometry){let{radius:e,segments:r,thetaLength:i}=n.geometry.parameters;n.geometry=new o.CircleGeometry(e,r,t,i)}else console.warn(`only support THREE.CircleGeometry`)}setAngleHelperLength(e,t){let n=e===`x`||e===`y`?-t:t,r=n>=0?Math.max(n,.001):Math.min(n,-.001),i=this.getAngleHelper(e);if(i instanceof o.Mesh&&i.geometry instanceof o.CircleGeometry){let{radius:e,thetaStart:t}=i.geometry.parameters,n=Math.ceil(Math.abs(r)*(40/(2*Math.PI)));i.geometry=new o.CircleGeometry(e,n,t,r)}else console.warn(`only support THREE.CircleGeometry`)}setTipsAngle(e){var t;let n=(t=this.helperObject3D.angleTips)==null?void 0:t.element;n&&(n.innerText=`${e.toFixed(0)}°`)}setTipsPosition(e){let t=this.helperObject3D.angleTips;if(!t)return;let{x:n,y:r,z:i}=this.helperObject3D.getWorldPosition(new o.Vector3).clone().project(this.camera);if(i>1){t.hide();return}let a=this.container.getBoundingClientRect(),s=(n+1)/2*a.width,c=(-r+1)/2*a.height;t.setLeftTop(s+`px`,c+`px`)}extractAxisAngle(e,t){let n=t.clone().normalize(),r=e.x*n.x+e.y*n.y+e.z*n.z,i=e.w,a=2*Math.atan2(r,i);return Math.atan2(Math.sin(a),Math.cos(a))}showSnapGuideLines(e,t){this.removeSnapGuideLines();let r=(()=>{switch(e){case`x`:return[new o.Vector3(0,1,0),new o.Vector3(0,0,1)];case`y`:return[new o.Vector3(1,0,0),new o.Vector3(0,0,1)];case`z`:return[new o.Vector3(1,0,0),new o.Vector3(0,1,0)];default:return[]}})();for(let e of r){let r=this.solidGuide.createSolidLine(t,e,{color:16777215,renderOrder:n.RENDER_ORDER.DRAG_GUIDE_LINE});this.scene.add(r),this.snapGuideLines.push(r)}this.render()}removeSnapGuideLines(){for(let e of this.snapGuideLines)this.scene.remove(e),this.solidGuide.dispose(e);this.snapGuideLines=[]}};exports.RotateController=c;
338
+ */const require_runtime=require("../../../_virtual/_rolldown/runtime.js"),require_setObjectQuaternion=require("../utils/setObjectQuaternion.js"),require_constant=require("../constant.js"),require_BaseController=require("./BaseController.js"),require_solidGuide=require("../utils/solidGuide.js"),require_getMouseRaycaster=require("../utils/getMouseRaycaster.js");let three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);var helperQuaternionOffset=new three_webgpu.Quaternion,RotateController=class extends require_BaseController.BaseController{get rotateCenter(){return this.helperObject3D.position.clone()}constructor(...params){var _a,_b,_c;super(...params),this.name=`RotateController`,this.solidGuide=new require_solidGuide.SolidGuideLine(this.camera,this.container),this.snapGuideLines=[];let helper=this.helperObject3D;this.hoverListener([(_a=helper.xCircle)==null?void 0:_a.circle,(_b=helper.yCircle)==null?void 0:_b.circle,(_c=helper.zCircle)==null?void 0:_c.circle].filter(Boolean));let dragStart=this.dragStart.bind(this),dragging=this.dragging.bind(this),dragEnd=this.dragEnd.bind(this),show=this.show.bind(this),hide=this.hide.bind(this),updateHelperByCamera=()=>{this.helperObject3D.update(this.camera),this.render()};updateHelperByCamera(),this.domEvents.addEventListener(this.helperObject3D,`mousedown`,dragStart),document.addEventListener(`mousemove`,dragging),document.addEventListener(`mouseup`,dragEnd),this.domEvents.addEventListener(this.helperObject3D,`touchstart`,dragStart),document.addEventListener(`touchmove`,dragging),document.addEventListener(`touchend`,dragEnd),this.hooks.on(`moveStart`,hide),this.hooks.on(`moveEnd`,show),this.hooks.on(`scaleStart`,hide),this.hooks.on(`scaleEnd`,show),this.hooks.on(`moveByMouseEnable`,hide),this.hooks.on(`moveByMouseDisable`,show),this.hooks.on(`updateOtherHelpers`,params=>{this.helperObject3D.update(params.camera),this.render()}),this.cameraHooks.on(`cameraUpdate`,updateHelperByCamera),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,`mousedown`,dragStart),document.removeEventListener(`mousemove`,dragging),document.removeEventListener(`mouseup`,dragEnd),this.domEvents.removeEventListener(this.helperObject3D,`touchstart`,dragStart),document.removeEventListener(`touchmove`,dragging),document.removeEventListener(`touchend`,dragEnd),this.hooks.off(`moveStart`,hide),this.hooks.off(`moveEnd`,show),this.hooks.off(`scaleStart`,hide),this.hooks.off(`scaleEnd`,show),this.hooks.off(`moveByMouseEnable`,hide),this.hooks.off(`moveByMouseDisable`,show),this.hooks.off(`updateOtherHelpers`),this.cameraHooks.off(`cameraUpdate`,updateHelperByCamera)})}setRotateAngle(angle){let{x=0,y=0,z=0}=angle,euler=new three_webgpu.Euler(three_webgpu.MathUtils.degToRad(x),three_webgpu.MathUtils.degToRad(y),three_webgpu.MathUtils.degToRad(z)),quaternion=new three_webgpu.Quaternion().setFromEuler(euler);if(this.hooks.emit(`wantToRotate`,quaternion))return;let{originObject3D,rotateCenter}=this;require_setObjectQuaternion.default(originObject3D,quaternion,rotateCenter),this.internalHooks.emit(`setObjectRotate`,quaternion,rotateCenter),this.hooks.emit(`rotate`,quaternion),this.render()}getEulerAngle(axis,angle){let{originObject3D}=this,currentEuler=new three_webgpu.Euler().setFromQuaternion(originObject3D.quaternion),currentAngles={x:three_webgpu.MathUtils.radToDeg(currentEuler.x),y:three_webgpu.MathUtils.radToDeg(currentEuler.y),z:three_webgpu.MathUtils.radToDeg(currentEuler.z)},newAngles={x:axis===`x`?angle:currentAngles.x,y:axis===`y`?angle:currentAngles.y,z:axis===`z`?angle:currentAngles.z},newEuler=new three_webgpu.Euler(three_webgpu.MathUtils.degToRad(newAngles.x),three_webgpu.MathUtils.degToRad(newAngles.y),three_webgpu.MathUtils.degToRad(newAngles.z));return new three_webgpu.Quaternion().setFromEuler(newEuler)}onApplyOriginObjectRotate(params){this.isDragging||super.onApplyOriginObjectRotate(params)}onApplyOriginObjectScale(params){}dragStart(params){if(this.isDragging)return;this.helperObject3D.update(this.camera);let intersect=params==null?void 0:params.intersect;if(!intersect)return this.dragEnd();let direction=(intersect==null?void 0:intersect.object).direction;if(!direction)return this.dragEnd();let startIntersect=intersect.point;this.setTipsAngle(0);let tipsPosition=startIntersect.clone();tipsPosition.y+=.2,this.setTipsPosition(tipsPosition);let helperQuaternion=new three_webgpu.Quaternion,directionVector=direction===`x`?new three_webgpu.Vector3(1,0,0):direction===`y`?new three_webgpu.Vector3(0,1,0):direction===`z`?new three_webgpu.Vector3(0,0,1):new three_webgpu.Vector3(0,1,0),plane=new three_webgpu.Plane().setFromNormalAndCoplanarPoint(directionVector,startIntersect),startVector=plane.projectPoint(startIntersect.clone(),new three_webgpu.Vector3).clone().sub(this.rotateCenter),angleHelper=this.getAngleHelper(direction);if(!angleHelper)return this.dragEnd();let startAngle=startVector.angleTo(angleHelper.baseAxes.clone().applyQuaternion(helperQuaternion)),processedAngle=angleHelper.offsetAngle(startAngle);this.setAngleHelperStart(direction,processedAngle),this.setAngleHelperLength(direction,0),this.startInfo={direction,startVector,directionVector,plane,angleHelper,angle:0,helperQuaternion:helperQuaternion.clone(),startQuaternion:this.originObject3D.quaternion.clone()},helperQuaternionOffset=new three_webgpu.Quaternion,this.helperObject3D.showDraggingHelper([direction]),this.hooks.emit(`rotateStart`,direction),this.isDragging=!0}getMatrix(){var _a,_b;return(_b=(_a=this.originObject3D)==null?void 0:_a.ext)==null?void 0:_b.matrix}getMatrixAngle(matrix,direction){let matrixQuaternion;if(matrix&&matrix.isMatrix4){matrixQuaternion=new three_webgpu.Quaternion,matrix.decompose(new three_webgpu.Vector3,matrixQuaternion,new three_webgpu.Vector3);let euler=new three_webgpu.Euler().setFromQuaternion(matrixQuaternion);if(direction===`x`)return Math.round(three_webgpu.MathUtils.radToDeg(euler.z));if(direction===`y`)return Math.round(three_webgpu.MathUtils.radToDeg(euler.y));if(direction===`z`)return Math.round(three_webgpu.MathUtils.radToDeg(euler.x))}}parseAngleByDirection(direction){var _a,_b;let matrix=(_b=(_a=this.originObject3D)==null?void 0:_a.ext)==null?void 0:_b.matrix,matrixQuaternion;if(matrix&&matrix.isMatrix4){matrixQuaternion=new three_webgpu.Quaternion,matrix.decompose(new three_webgpu.Vector3,matrixQuaternion,new three_webgpu.Vector3);let euler=new three_webgpu.Euler().setFromQuaternion(matrixQuaternion);if(direction===`x`)return Math.round(three_webgpu.MathUtils.radToDeg(euler.z));if(direction===`y`)return Math.round(three_webgpu.MathUtils.radToDeg(euler.y));if(direction===`z`)return Math.round(three_webgpu.MathUtils.radToDeg(euler.x))}}dragging(point){if(!this.isDragging)return;let x=`touches`in point?point.touches[0].clientX:point.x,y=`touches`in point?point.touches[0].clientY:point.y,ray=require_getMouseRaycaster.getMouseRaycaster(this.camera,{x,y},this.container);return ray?(this.rotate(ray),!1):this.dragEnd()}rotate(raycaster){if(!this.startInfo)return this.dragEnd();let{startVector,plane,angleHelper,direction,helperQuaternion}=this.startInfo,{originObject3D}=this,currentIntersectPoint=raycaster.ray.intersectPlane(plane,new three_webgpu.Vector3);if(!currentIntersectPoint)return;let rotateCenter=this.rotateCenter.clone(),currentVector=plane.projectPoint(currentIntersectPoint.clone(),new three_webgpu.Vector3).clone().sub(rotateCenter),rotationAxis=this.startInfo.directionVector.clone().normalize();currentVector=currentVector.clone().projectOnPlane(rotationAxis).normalize().multiplyScalar(currentVector.length());let quaternion=new three_webgpu.Quaternion().setFromUnitVectors(startVector.clone().normalize(),currentVector.clone().normalize()),newQuaternion=originObject3D.quaternion.clone().premultiply(quaternion);if(startVector.angleTo(currentVector)===0||this.hooks.emit(`wantToRotate`,newQuaternion))return;let rawAngle=new three_webgpu.Euler().setFromQuaternion(new three_webgpu.Quaternion().setFromUnitVectors(startVector.clone().normalize().applyQuaternion(helperQuaternion.clone().invert()),currentVector.clone().normalize().applyQuaternion(helperQuaternion.clone().invert())),`${direction.toUpperCase()}${`XZY`.replace(direction.toUpperCase(),``)}`)[direction]*angleHelper.angleDirection,prevTotalAngle=this.startInfo.angle,totalAngle=prevTotalAngle+rawAngle,SNAP_ANGLE=Math.PI/2,SNAP_THRESHOLD=three_webgpu.MathUtils.degToRad(5),MIN_DRAG_FOR_SNAP=three_webgpu.MathUtils.degToRad(10),trialQ=new three_webgpu.Quaternion().setFromAxisAngle(rotationAxis,totalAngle),trialObjectQ=this.startInfo.startQuaternion.clone().premultiply(trialQ),absAngle=this.extractAxisAngle(trialObjectQ,rotationAxis),nearestSnap=Math.round(absAngle/SNAP_ANGLE)*SNAP_ANGLE,distToSnap=Math.abs(absAngle-nearestSnap);if(Math.abs(totalAngle)>MIN_DRAG_FOR_SNAP&&distToSnap<SNAP_THRESHOLD){let correction=nearestSnap-absAngle;totalAngle+=correction}let frameAngle=totalAngle-prevTotalAngle;this.startInfo.angle=totalAngle;let isSnapped=Math.abs(frameAngle)<1e-6&&Math.abs(rawAngle)>1e-6,wasSnapping=this.snapGuideLines.length>0;isSnapped&&!wasSnapping?this.showSnapGuideLines(direction,rotateCenter):!isSnapped&&wasSnapping&&this.removeSnapGuideLines(),this.setAngleHelperLength(direction,this.startInfo.angle),this.setTipsAngle(three_webgpu.MathUtils.radToDeg(this.startInfo.angle));let frameQuaternion=new three_webgpu.Quaternion().setFromAxisAngle(rotationAxis,frameAngle);if(rotateCenter){let v=new three_webgpu.Vector3().subVectors(originObject3D.position,rotateCenter).applyQuaternion(frameQuaternion).add(rotateCenter);originObject3D.position.copy(v)}originObject3D.applyQuaternion(frameQuaternion),helperQuaternionOffset.premultiply(frameQuaternion),this.internalHooks.emit(`applyObjectRotate`,{quaternion:frameQuaternion,origin:rotateCenter}),this.hooks.emit(`rotate`,originObject3D.quaternion),isSnapped||(this.startInfo.startVector=currentVector)}dragEnd(){var _a;this.isDragging&&(this.removeSnapGuideLines(),(_a=this.startInfo)!=null&&_a.lineMeshes&&this.startInfo.lineMeshes.forEach(mesh=>{this.scene.remove(mesh),mesh.geometry.dispose(),mesh.material instanceof three_webgpu.Material&&mesh.material.dispose()}),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.updateOtherHelpers(),this.hooks.emit(`rotateEnd`))}updateOtherHelpers(){this.hooks.emit(`updateOtherHelpers`,{camera:this.camera})}getAngleHelper(direction){var _a,_b,_c;switch(direction){case`x`:return(_a=this.helperObject3D.xCircle)==null?void 0:_a.angleSector;case`y`:return(_b=this.helperObject3D.yCircle)==null?void 0:_b.angleSector;case`z`:return(_c=this.helperObject3D.zCircle)==null?void 0:_c.angleSector}}setAngleHelperStart(direction,start){let angleHelper=this.getAngleHelper(direction);if(!angleHelper){console.warn(`angleHelper is undefined`);return}if(angleHelper instanceof three_webgpu.Mesh&&angleHelper.geometry instanceof three_webgpu.CircleGeometry){let{radius,segments,thetaLength}=angleHelper.geometry.parameters;angleHelper.geometry=new three_webgpu.CircleGeometry(radius,segments,start,thetaLength)}else console.warn(`only support THREE.CircleGeometry`)}setAngleHelperLength(direction,length){let adjustedLength=direction===`x`||direction===`y`?-length:length,thetaLength=adjustedLength>=0?Math.max(adjustedLength,.001):Math.min(adjustedLength,-.001),angleHelper=this.getAngleHelper(direction);if(angleHelper instanceof three_webgpu.Mesh&&angleHelper.geometry instanceof three_webgpu.CircleGeometry){let{radius,thetaStart}=angleHelper.geometry.parameters,segments=Math.ceil(Math.abs(thetaLength)*(40/(2*Math.PI)));angleHelper.geometry=new three_webgpu.CircleGeometry(radius,segments,thetaStart,thetaLength)}else console.warn(`only support THREE.CircleGeometry`)}setTipsAngle(angle){var _a;let element=(_a=this.helperObject3D.angleTips)==null?void 0:_a.element;element&&(element.innerText=`${angle.toFixed(0)}°`)}setTipsPosition(position){let angleTips=this.helperObject3D.angleTips;if(!angleTips)return;let{x,y,z}=this.helperObject3D.getWorldPosition(new three_webgpu.Vector3).clone().project(this.camera);if(z>1){angleTips.hide();return}let rect=this.container.getBoundingClientRect(),px=(x+1)/2*rect.width,py=(-y+1)/2*rect.height;angleTips.setLeftTop(px+`px`,py+`px`)}extractAxisAngle(q,axis){let a=axis.clone().normalize(),sinHalf=q.x*a.x+q.y*a.y+q.z*a.z,cosHalf=q.w,angle=2*Math.atan2(sinHalf,cosHalf);return Math.atan2(Math.sin(angle),Math.cos(angle))}showSnapGuideLines(direction,center){this.removeSnapGuideLines();let axes=(()=>{switch(direction){case`x`:return[new three_webgpu.Vector3(0,1,0),new three_webgpu.Vector3(0,0,1)];case`y`:return[new three_webgpu.Vector3(1,0,0),new three_webgpu.Vector3(0,0,1)];case`z`:return[new three_webgpu.Vector3(1,0,0),new three_webgpu.Vector3(0,1,0)];default:return[]}})();for(let axis of axes){let line=this.solidGuide.createSolidLine(center,axis,{color:16777215,renderOrder:require_constant.RENDER_ORDER.DRAG_GUIDE_LINE});this.scene.add(line),this.snapGuideLines.push(line)}this.render()}removeSnapGuideLines(){for(let line of this.snapGuideLines)this.scene.remove(line),this.solidGuide.dispose(line);this.snapGuideLines=[]}};exports.RotateController=RotateController;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */import e from"../utils/setObjectQuaternion.mjs";import{RENDER_ORDER as t}from"../constant.mjs";import{BaseController as n}from"./BaseController.mjs";import{SolidGuideLine as r}from"../utils/solidGuide.mjs";import{getMouseRaycaster as i}from"../utils/getMouseRaycaster.mjs";import*as a from"three/webgpu";var o=new a.Quaternion,s=class extends n{get rotateCenter(){return this.helperObject3D.position.clone()}constructor(...e){var t,n,i;super(...e),this.name=`RotateController`,this.solidGuide=new r(this.camera,this.container),this.snapGuideLines=[];let a=this.helperObject3D;this.hoverListener([(t=a.xCircle)==null?void 0:t.circle,(n=a.yCircle)==null?void 0:n.circle,(i=a.zCircle)==null?void 0:i.circle].filter(Boolean));let o=this.dragStart.bind(this),s=this.dragging.bind(this),c=this.dragEnd.bind(this),l=this.show.bind(this),u=this.hide.bind(this),d=()=>{this.helperObject3D.update(this.camera),this.render()};d(),this.domEvents.addEventListener(this.helperObject3D,`mousedown`,o),document.addEventListener(`mousemove`,s),document.addEventListener(`mouseup`,c),this.domEvents.addEventListener(this.helperObject3D,`touchstart`,o),document.addEventListener(`touchmove`,s),document.addEventListener(`touchend`,c),this.hooks.on(`moveStart`,u),this.hooks.on(`moveEnd`,l),this.hooks.on(`scaleStart`,u),this.hooks.on(`scaleEnd`,l),this.hooks.on(`moveByMouseEnable`,u),this.hooks.on(`moveByMouseDisable`,l),this.hooks.on(`updateOtherHelpers`,e=>{this.helperObject3D.update(e.camera),this.render()}),this.cameraHooks.on(`cameraUpdate`,d),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,`mousedown`,o),document.removeEventListener(`mousemove`,s),document.removeEventListener(`mouseup`,c),this.domEvents.removeEventListener(this.helperObject3D,`touchstart`,o),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),this.hooks.off(`moveStart`,u),this.hooks.off(`moveEnd`,l),this.hooks.off(`scaleStart`,u),this.hooks.off(`scaleEnd`,l),this.hooks.off(`moveByMouseEnable`,u),this.hooks.off(`moveByMouseDisable`,l),this.hooks.off(`updateOtherHelpers`),this.cameraHooks.off(`cameraUpdate`,d)})}setRotateAngle(t){let{x:n=0,y:r=0,z:i=0}=t,o=new a.Euler(a.MathUtils.degToRad(n),a.MathUtils.degToRad(r),a.MathUtils.degToRad(i)),s=new a.Quaternion().setFromEuler(o);if(this.hooks.emit(`wantToRotate`,s))return;let{originObject3D:c,rotateCenter:l}=this;e(c,s,l),this.internalHooks.emit(`setObjectRotate`,s,l),this.hooks.emit(`rotate`,s),this.render()}getEulerAngle(e,t){let{originObject3D:n}=this,r=new a.Euler().setFromQuaternion(n.quaternion),i={x:a.MathUtils.radToDeg(r.x),y:a.MathUtils.radToDeg(r.y),z:a.MathUtils.radToDeg(r.z)},o={x:e===`x`?t:i.x,y:e===`y`?t:i.y,z:e===`z`?t:i.z},s=new a.Euler(a.MathUtils.degToRad(o.x),a.MathUtils.degToRad(o.y),a.MathUtils.degToRad(o.z));return new a.Quaternion().setFromEuler(s)}onApplyOriginObjectRotate(e){this.isDragging||super.onApplyOriginObjectRotate(e)}onApplyOriginObjectScale(e){}dragStart(e){if(this.isDragging)return;this.helperObject3D.update(this.camera);let t=e==null?void 0:e.intersect;if(!t)return this.dragEnd();let n=(t==null?void 0:t.object).direction;if(!n)return this.dragEnd();let r=t.point;this.setTipsAngle(0);let i=r.clone();i.y+=.2,this.setTipsPosition(i);let s=new a.Quaternion,c=n===`x`?new a.Vector3(1,0,0):n===`y`?new a.Vector3(0,1,0):n===`z`?new a.Vector3(0,0,1):new a.Vector3(0,1,0),l=new a.Plane().setFromNormalAndCoplanarPoint(c,r),u=l.projectPoint(r.clone(),new a.Vector3).clone().sub(this.rotateCenter),d=this.getAngleHelper(n);if(!d)return this.dragEnd();let f=u.angleTo(d.baseAxes.clone().applyQuaternion(s)),p=d.offsetAngle(f);this.setAngleHelperStart(n,p),this.setAngleHelperLength(n,0),this.startInfo={direction:n,startVector:u,directionVector:c,plane:l,angleHelper:d,angle:0,helperQuaternion:s.clone(),startQuaternion:this.originObject3D.quaternion.clone()},o=new a.Quaternion,this.helperObject3D.showDraggingHelper([n]),this.hooks.emit(`rotateStart`,n),this.isDragging=!0}getMatrix(){var e,t;return(t=(e=this.originObject3D)==null?void 0:e.ext)==null?void 0:t.matrix}getMatrixAngle(e,t){let n;if(e&&e.isMatrix4){n=new a.Quaternion,e.decompose(new a.Vector3,n,new a.Vector3);let r=new a.Euler().setFromQuaternion(n);if(t===`x`)return Math.round(a.MathUtils.radToDeg(r.z));if(t===`y`)return Math.round(a.MathUtils.radToDeg(r.y));if(t===`z`)return Math.round(a.MathUtils.radToDeg(r.x))}}parseAngleByDirection(e){var t,n;let r=(n=(t=this.originObject3D)==null?void 0:t.ext)==null?void 0:n.matrix,i;if(r&&r.isMatrix4){i=new a.Quaternion,r.decompose(new a.Vector3,i,new a.Vector3);let t=new a.Euler().setFromQuaternion(i);if(e===`x`)return Math.round(a.MathUtils.radToDeg(t.z));if(e===`y`)return Math.round(a.MathUtils.radToDeg(t.y));if(e===`z`)return Math.round(a.MathUtils.radToDeg(t.x))}}dragging(e){if(!this.isDragging)return;let t=`touches`in e?e.touches[0].clientX:e.x,n=`touches`in e?e.touches[0].clientY:e.y,r=i(this.camera,{x:t,y:n},this.container);return r?(this.rotate(r),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();let{startVector:t,plane:n,angleHelper:r,direction:i,helperQuaternion:s}=this.startInfo,{originObject3D:c}=this,l=e.ray.intersectPlane(n,new a.Vector3);if(!l)return;let u=this.rotateCenter.clone(),d=n.projectPoint(l.clone(),new a.Vector3).clone().sub(u),f=this.startInfo.directionVector.clone().normalize();d=d.clone().projectOnPlane(f).normalize().multiplyScalar(d.length());let p=new a.Quaternion().setFromUnitVectors(t.clone().normalize(),d.clone().normalize()),m=c.quaternion.clone().premultiply(p);if(t.angleTo(d)===0||this.hooks.emit(`wantToRotate`,m))return;let h=new a.Euler().setFromQuaternion(new a.Quaternion().setFromUnitVectors(t.clone().normalize().applyQuaternion(s.clone().invert()),d.clone().normalize().applyQuaternion(s.clone().invert())),`${i.toUpperCase()}${`XZY`.replace(i.toUpperCase(),``)}`)[i]*r.angleDirection,g=this.startInfo.angle,_=g+h,v=Math.PI/2,y=a.MathUtils.degToRad(5),b=a.MathUtils.degToRad(10),x=new a.Quaternion().setFromAxisAngle(f,_),S=this.startInfo.startQuaternion.clone().premultiply(x),C=this.extractAxisAngle(S,f),w=Math.round(C/v)*v,T=Math.abs(C-w);if(Math.abs(_)>b&&T<y){let e=w-C;_+=e}let E=_-g;this.startInfo.angle=_;let D=Math.abs(E)<1e-6&&Math.abs(h)>1e-6,O=this.snapGuideLines.length>0;D&&!O?this.showSnapGuideLines(i,u):!D&&O&&this.removeSnapGuideLines(),this.setAngleHelperLength(i,this.startInfo.angle),this.setTipsAngle(a.MathUtils.radToDeg(this.startInfo.angle));let k=new a.Quaternion().setFromAxisAngle(f,E);if(u){let e=new a.Vector3().subVectors(c.position,u).applyQuaternion(k).add(u);c.position.copy(e)}c.applyQuaternion(k),o.premultiply(k),this.internalHooks.emit(`applyObjectRotate`,{quaternion:k,origin:u}),this.hooks.emit(`rotate`,c.quaternion),D||(this.startInfo.startVector=d)}dragEnd(){var e;this.isDragging&&(this.removeSnapGuideLines(),(e=this.startInfo)!=null&&e.lineMeshes&&this.startInfo.lineMeshes.forEach(e=>{this.scene.remove(e),e.geometry.dispose(),e.material instanceof a.Material&&e.material.dispose()}),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.updateOtherHelpers(),this.hooks.emit(`rotateEnd`))}updateOtherHelpers(){this.hooks.emit(`updateOtherHelpers`,{camera:this.camera})}getAngleHelper(e){var t,n,r;switch(e){case`x`:return(t=this.helperObject3D.xCircle)==null?void 0:t.angleSector;case`y`:return(n=this.helperObject3D.yCircle)==null?void 0:n.angleSector;case`z`:return(r=this.helperObject3D.zCircle)==null?void 0:r.angleSector}}setAngleHelperStart(e,t){let n=this.getAngleHelper(e);if(!n){console.warn(`angleHelper is undefined`);return}if(n instanceof a.Mesh&&n.geometry instanceof a.CircleGeometry){let{radius:e,segments:r,thetaLength:i}=n.geometry.parameters;n.geometry=new a.CircleGeometry(e,r,t,i)}else console.warn(`only support THREE.CircleGeometry`)}setAngleHelperLength(e,t){let n=e===`x`||e===`y`?-t:t,r=n>=0?Math.max(n,.001):Math.min(n,-.001),i=this.getAngleHelper(e);if(i instanceof a.Mesh&&i.geometry instanceof a.CircleGeometry){let{radius:e,thetaStart:t}=i.geometry.parameters,n=Math.ceil(Math.abs(r)*(40/(2*Math.PI)));i.geometry=new a.CircleGeometry(e,n,t,r)}else console.warn(`only support THREE.CircleGeometry`)}setTipsAngle(e){var t;let n=(t=this.helperObject3D.angleTips)==null?void 0:t.element;n&&(n.innerText=`${e.toFixed(0)}°`)}setTipsPosition(e){let t=this.helperObject3D.angleTips;if(!t)return;let{x:n,y:r,z:i}=this.helperObject3D.getWorldPosition(new a.Vector3).clone().project(this.camera);if(i>1){t.hide();return}let o=this.container.getBoundingClientRect(),s=(n+1)/2*o.width,c=(-r+1)/2*o.height;t.setLeftTop(s+`px`,c+`px`)}extractAxisAngle(e,t){let n=t.clone().normalize(),r=e.x*n.x+e.y*n.y+e.z*n.z,i=e.w,a=2*Math.atan2(r,i);return Math.atan2(Math.sin(a),Math.cos(a))}showSnapGuideLines(e,n){this.removeSnapGuideLines();let r=(()=>{switch(e){case`x`:return[new a.Vector3(0,1,0),new a.Vector3(0,0,1)];case`y`:return[new a.Vector3(1,0,0),new a.Vector3(0,0,1)];case`z`:return[new a.Vector3(1,0,0),new a.Vector3(0,1,0)];default:return[]}})();for(let e of r){let r=this.solidGuide.createSolidLine(n,e,{color:16777215,renderOrder:t.DRAG_GUIDE_LINE});this.scene.add(r),this.snapGuideLines.push(r)}this.render()}removeSnapGuideLines(){for(let e of this.snapGuideLines)this.scene.remove(e),this.solidGuide.dispose(e);this.snapGuideLines=[]}};export{s as RotateController};
338
+ */import setObjectQuaternion from"../utils/setObjectQuaternion.mjs";import{RENDER_ORDER}from"../constant.mjs";import{BaseController}from"./BaseController.mjs";import{SolidGuideLine}from"../utils/solidGuide.mjs";import{getMouseRaycaster}from"../utils/getMouseRaycaster.mjs";import*as THREE from"three/webgpu";var helperQuaternionOffset=new THREE.Quaternion,RotateController=class extends BaseController{get rotateCenter(){return this.helperObject3D.position.clone()}constructor(...params){var _a,_b,_c;super(...params),this.name=`RotateController`,this.solidGuide=new SolidGuideLine(this.camera,this.container),this.snapGuideLines=[];let helper=this.helperObject3D;this.hoverListener([(_a=helper.xCircle)==null?void 0:_a.circle,(_b=helper.yCircle)==null?void 0:_b.circle,(_c=helper.zCircle)==null?void 0:_c.circle].filter(Boolean));let dragStart=this.dragStart.bind(this),dragging=this.dragging.bind(this),dragEnd=this.dragEnd.bind(this),show=this.show.bind(this),hide=this.hide.bind(this),updateHelperByCamera=()=>{this.helperObject3D.update(this.camera),this.render()};updateHelperByCamera(),this.domEvents.addEventListener(this.helperObject3D,`mousedown`,dragStart),document.addEventListener(`mousemove`,dragging),document.addEventListener(`mouseup`,dragEnd),this.domEvents.addEventListener(this.helperObject3D,`touchstart`,dragStart),document.addEventListener(`touchmove`,dragging),document.addEventListener(`touchend`,dragEnd),this.hooks.on(`moveStart`,hide),this.hooks.on(`moveEnd`,show),this.hooks.on(`scaleStart`,hide),this.hooks.on(`scaleEnd`,show),this.hooks.on(`moveByMouseEnable`,hide),this.hooks.on(`moveByMouseDisable`,show),this.hooks.on(`updateOtherHelpers`,params=>{this.helperObject3D.update(params.camera),this.render()}),this.cameraHooks.on(`cameraUpdate`,updateHelperByCamera),this.disposers.push(()=>{this.domEvents.removeEventListener(this.helperObject3D,`mousedown`,dragStart),document.removeEventListener(`mousemove`,dragging),document.removeEventListener(`mouseup`,dragEnd),this.domEvents.removeEventListener(this.helperObject3D,`touchstart`,dragStart),document.removeEventListener(`touchmove`,dragging),document.removeEventListener(`touchend`,dragEnd),this.hooks.off(`moveStart`,hide),this.hooks.off(`moveEnd`,show),this.hooks.off(`scaleStart`,hide),this.hooks.off(`scaleEnd`,show),this.hooks.off(`moveByMouseEnable`,hide),this.hooks.off(`moveByMouseDisable`,show),this.hooks.off(`updateOtherHelpers`),this.cameraHooks.off(`cameraUpdate`,updateHelperByCamera)})}setRotateAngle(angle){let{x=0,y=0,z=0}=angle,euler=new THREE.Euler(THREE.MathUtils.degToRad(x),THREE.MathUtils.degToRad(y),THREE.MathUtils.degToRad(z)),quaternion=new THREE.Quaternion().setFromEuler(euler);if(this.hooks.emit(`wantToRotate`,quaternion))return;let{originObject3D,rotateCenter}=this;setObjectQuaternion(originObject3D,quaternion,rotateCenter),this.internalHooks.emit(`setObjectRotate`,quaternion,rotateCenter),this.hooks.emit(`rotate`,quaternion),this.render()}getEulerAngle(axis,angle){let{originObject3D}=this,currentEuler=new THREE.Euler().setFromQuaternion(originObject3D.quaternion),currentAngles={x:THREE.MathUtils.radToDeg(currentEuler.x),y:THREE.MathUtils.radToDeg(currentEuler.y),z:THREE.MathUtils.radToDeg(currentEuler.z)},newAngles={x:axis===`x`?angle:currentAngles.x,y:axis===`y`?angle:currentAngles.y,z:axis===`z`?angle:currentAngles.z},newEuler=new THREE.Euler(THREE.MathUtils.degToRad(newAngles.x),THREE.MathUtils.degToRad(newAngles.y),THREE.MathUtils.degToRad(newAngles.z));return new THREE.Quaternion().setFromEuler(newEuler)}onApplyOriginObjectRotate(params){this.isDragging||super.onApplyOriginObjectRotate(params)}onApplyOriginObjectScale(params){}dragStart(params){if(this.isDragging)return;this.helperObject3D.update(this.camera);let intersect=params==null?void 0:params.intersect;if(!intersect)return this.dragEnd();let direction=(intersect==null?void 0:intersect.object).direction;if(!direction)return this.dragEnd();let startIntersect=intersect.point;this.setTipsAngle(0);let tipsPosition=startIntersect.clone();tipsPosition.y+=.2,this.setTipsPosition(tipsPosition);let helperQuaternion=new THREE.Quaternion,directionVector=direction===`x`?new THREE.Vector3(1,0,0):direction===`y`?new THREE.Vector3(0,1,0):direction===`z`?new THREE.Vector3(0,0,1):new THREE.Vector3(0,1,0),plane=new THREE.Plane().setFromNormalAndCoplanarPoint(directionVector,startIntersect),startVector=plane.projectPoint(startIntersect.clone(),new THREE.Vector3).clone().sub(this.rotateCenter),angleHelper=this.getAngleHelper(direction);if(!angleHelper)return this.dragEnd();let startAngle=startVector.angleTo(angleHelper.baseAxes.clone().applyQuaternion(helperQuaternion)),processedAngle=angleHelper.offsetAngle(startAngle);this.setAngleHelperStart(direction,processedAngle),this.setAngleHelperLength(direction,0),this.startInfo={direction,startVector,directionVector,plane,angleHelper,angle:0,helperQuaternion:helperQuaternion.clone(),startQuaternion:this.originObject3D.quaternion.clone()},helperQuaternionOffset=new THREE.Quaternion,this.helperObject3D.showDraggingHelper([direction]),this.hooks.emit(`rotateStart`,direction),this.isDragging=!0}getMatrix(){var _a,_b;return(_b=(_a=this.originObject3D)==null?void 0:_a.ext)==null?void 0:_b.matrix}getMatrixAngle(matrix,direction){let matrixQuaternion;if(matrix&&matrix.isMatrix4){matrixQuaternion=new THREE.Quaternion,matrix.decompose(new THREE.Vector3,matrixQuaternion,new THREE.Vector3);let euler=new THREE.Euler().setFromQuaternion(matrixQuaternion);if(direction===`x`)return Math.round(THREE.MathUtils.radToDeg(euler.z));if(direction===`y`)return Math.round(THREE.MathUtils.radToDeg(euler.y));if(direction===`z`)return Math.round(THREE.MathUtils.radToDeg(euler.x))}}parseAngleByDirection(direction){var _a,_b;let matrix=(_b=(_a=this.originObject3D)==null?void 0:_a.ext)==null?void 0:_b.matrix,matrixQuaternion;if(matrix&&matrix.isMatrix4){matrixQuaternion=new THREE.Quaternion,matrix.decompose(new THREE.Vector3,matrixQuaternion,new THREE.Vector3);let euler=new THREE.Euler().setFromQuaternion(matrixQuaternion);if(direction===`x`)return Math.round(THREE.MathUtils.radToDeg(euler.z));if(direction===`y`)return Math.round(THREE.MathUtils.radToDeg(euler.y));if(direction===`z`)return Math.round(THREE.MathUtils.radToDeg(euler.x))}}dragging(point){if(!this.isDragging)return;let x=`touches`in point?point.touches[0].clientX:point.x,y=`touches`in point?point.touches[0].clientY:point.y,ray=getMouseRaycaster(this.camera,{x,y},this.container);return ray?(this.rotate(ray),!1):this.dragEnd()}rotate(raycaster){if(!this.startInfo)return this.dragEnd();let{startVector,plane,angleHelper,direction,helperQuaternion}=this.startInfo,{originObject3D}=this,currentIntersectPoint=raycaster.ray.intersectPlane(plane,new THREE.Vector3);if(!currentIntersectPoint)return;let rotateCenter=this.rotateCenter.clone(),currentVector=plane.projectPoint(currentIntersectPoint.clone(),new THREE.Vector3).clone().sub(rotateCenter),rotationAxis=this.startInfo.directionVector.clone().normalize();currentVector=currentVector.clone().projectOnPlane(rotationAxis).normalize().multiplyScalar(currentVector.length());let quaternion=new THREE.Quaternion().setFromUnitVectors(startVector.clone().normalize(),currentVector.clone().normalize()),newQuaternion=originObject3D.quaternion.clone().premultiply(quaternion);if(startVector.angleTo(currentVector)===0||this.hooks.emit(`wantToRotate`,newQuaternion))return;let rawAngle=new THREE.Euler().setFromQuaternion(new THREE.Quaternion().setFromUnitVectors(startVector.clone().normalize().applyQuaternion(helperQuaternion.clone().invert()),currentVector.clone().normalize().applyQuaternion(helperQuaternion.clone().invert())),`${direction.toUpperCase()}${`XZY`.replace(direction.toUpperCase(),``)}`)[direction]*angleHelper.angleDirection,prevTotalAngle=this.startInfo.angle,totalAngle=prevTotalAngle+rawAngle,SNAP_ANGLE=Math.PI/2,SNAP_THRESHOLD=THREE.MathUtils.degToRad(5),MIN_DRAG_FOR_SNAP=THREE.MathUtils.degToRad(10),trialQ=new THREE.Quaternion().setFromAxisAngle(rotationAxis,totalAngle),trialObjectQ=this.startInfo.startQuaternion.clone().premultiply(trialQ),absAngle=this.extractAxisAngle(trialObjectQ,rotationAxis),nearestSnap=Math.round(absAngle/SNAP_ANGLE)*SNAP_ANGLE,distToSnap=Math.abs(absAngle-nearestSnap);if(Math.abs(totalAngle)>MIN_DRAG_FOR_SNAP&&distToSnap<SNAP_THRESHOLD){let correction=nearestSnap-absAngle;totalAngle+=correction}let frameAngle=totalAngle-prevTotalAngle;this.startInfo.angle=totalAngle;let isSnapped=Math.abs(frameAngle)<1e-6&&Math.abs(rawAngle)>1e-6,wasSnapping=this.snapGuideLines.length>0;isSnapped&&!wasSnapping?this.showSnapGuideLines(direction,rotateCenter):!isSnapped&&wasSnapping&&this.removeSnapGuideLines(),this.setAngleHelperLength(direction,this.startInfo.angle),this.setTipsAngle(THREE.MathUtils.radToDeg(this.startInfo.angle));let frameQuaternion=new THREE.Quaternion().setFromAxisAngle(rotationAxis,frameAngle);if(rotateCenter){let v=new THREE.Vector3().subVectors(originObject3D.position,rotateCenter).applyQuaternion(frameQuaternion).add(rotateCenter);originObject3D.position.copy(v)}originObject3D.applyQuaternion(frameQuaternion),helperQuaternionOffset.premultiply(frameQuaternion),this.internalHooks.emit(`applyObjectRotate`,{quaternion:frameQuaternion,origin:rotateCenter}),this.hooks.emit(`rotate`,originObject3D.quaternion),isSnapped||(this.startInfo.startVector=currentVector)}dragEnd(){var _a;this.isDragging&&(this.removeSnapGuideLines(),(_a=this.startInfo)!=null&&_a.lineMeshes&&this.startInfo.lineMeshes.forEach(mesh=>{this.scene.remove(mesh),mesh.geometry.dispose(),mesh.material instanceof THREE.Material&&mesh.material.dispose()}),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.updateOtherHelpers(),this.hooks.emit(`rotateEnd`))}updateOtherHelpers(){this.hooks.emit(`updateOtherHelpers`,{camera:this.camera})}getAngleHelper(direction){var _a,_b,_c;switch(direction){case`x`:return(_a=this.helperObject3D.xCircle)==null?void 0:_a.angleSector;case`y`:return(_b=this.helperObject3D.yCircle)==null?void 0:_b.angleSector;case`z`:return(_c=this.helperObject3D.zCircle)==null?void 0:_c.angleSector}}setAngleHelperStart(direction,start){let angleHelper=this.getAngleHelper(direction);if(!angleHelper){console.warn(`angleHelper is undefined`);return}if(angleHelper instanceof THREE.Mesh&&angleHelper.geometry instanceof THREE.CircleGeometry){let{radius,segments,thetaLength}=angleHelper.geometry.parameters;angleHelper.geometry=new THREE.CircleGeometry(radius,segments,start,thetaLength)}else console.warn(`only support THREE.CircleGeometry`)}setAngleHelperLength(direction,length){let adjustedLength=direction===`x`||direction===`y`?-length:length,thetaLength=adjustedLength>=0?Math.max(adjustedLength,.001):Math.min(adjustedLength,-.001),angleHelper=this.getAngleHelper(direction);if(angleHelper instanceof THREE.Mesh&&angleHelper.geometry instanceof THREE.CircleGeometry){let{radius,thetaStart}=angleHelper.geometry.parameters,segments=Math.ceil(Math.abs(thetaLength)*(40/(2*Math.PI)));angleHelper.geometry=new THREE.CircleGeometry(radius,segments,thetaStart,thetaLength)}else console.warn(`only support THREE.CircleGeometry`)}setTipsAngle(angle){var _a;let element=(_a=this.helperObject3D.angleTips)==null?void 0:_a.element;element&&(element.innerText=`${angle.toFixed(0)}°`)}setTipsPosition(position){let angleTips=this.helperObject3D.angleTips;if(!angleTips)return;let{x,y,z}=this.helperObject3D.getWorldPosition(new THREE.Vector3).clone().project(this.camera);if(z>1){angleTips.hide();return}let rect=this.container.getBoundingClientRect(),px=(x+1)/2*rect.width,py=(-y+1)/2*rect.height;angleTips.setLeftTop(px+`px`,py+`px`)}extractAxisAngle(q,axis){let a=axis.clone().normalize(),sinHalf=q.x*a.x+q.y*a.y+q.z*a.z,cosHalf=q.w,angle=2*Math.atan2(sinHalf,cosHalf);return Math.atan2(Math.sin(angle),Math.cos(angle))}showSnapGuideLines(direction,center){this.removeSnapGuideLines();let axes=(()=>{switch(direction){case`x`:return[new THREE.Vector3(0,1,0),new THREE.Vector3(0,0,1)];case`y`:return[new THREE.Vector3(1,0,0),new THREE.Vector3(0,0,1)];case`z`:return[new THREE.Vector3(1,0,0),new THREE.Vector3(0,1,0)];default:return[]}})();for(let axis of axes){let line=this.solidGuide.createSolidLine(center,axis,{color:16777215,renderOrder:RENDER_ORDER.DRAG_GUIDE_LINE});this.scene.add(line),this.snapGuideLines.push(line)}this.render()}removeSnapGuideLines(){for(let line of this.snapGuideLines)this.scene.remove(line),this.solidGuide.dispose(line);this.snapGuideLines=[]}};export{RotateController};
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */var e=class{constructor(e,t,n,r,i,a,o,s,c){this.onFiveWantsTapGesture=e=>{if(!this.helperController)return;if(this.helperController.preventTapDefaultEvent)return!1;let t=this.helperController.onWantsTapGesture(e);return this.five.needsRender=!0,t},this.onFiveWantsGesture=(...e)=>{if(!this.helperController)return;let t=this.helperController.onWantsGesture(...e);return this.five.needsRender=!0,t},this.onFiveIntersectionOnModelUpdate=(...e)=>{this.helperController&&this.helperController.onIntersectionOnModelUpdate(...e)};let{camera:l,model:u,scene:d}=e,f=e.getElement();if(this.five=e,!l||!u||!f||!d)return;let p=c==null?d:c,m=()=>{e.needsRender=!0};this.helperController=new n({camera:l,model:u,domEvents:t,originObject3D:r,helperObject3D:i,container:f,scene:p,onRender:m,sharedHooks:o,sharedInternalHooks:s},a),e.on(`wantsTapGesture`,this.onFiveWantsTapGesture),e.on(`wantsGesture`,this.onFiveWantsGesture),e.on(`intersectionOnModelUpdate`,this.onFiveIntersectionOnModelUpdate)}dispose(){var e;this.five.off(`wantsTapGesture`,this.onFiveWantsTapGesture),this.five.off(`wantsGesture`,this.onFiveWantsGesture),this.five.off(`intersectionOnModelUpdate`,this.onFiveIntersectionOnModelUpdate),(e=this.helperController)==null||e.dispose()}};exports.ControllerWrapper=e,exports.FiveControllerWrapper=e;
338
+ */var ControllerWrapper=class{constructor(five,donEvents,HelperController,object,helperObject3D,HelperControllerConfig,hooks,internalHooks,helperGroup){this.onFiveWantsTapGesture=params=>{if(!this.helperController)return;if(this.helperController.preventTapDefaultEvent)return!1;let result=this.helperController.onWantsTapGesture(params);return this.five.needsRender=!0,result},this.onFiveWantsGesture=(...params)=>{if(!this.helperController)return;let result=this.helperController.onWantsGesture(...params);return this.five.needsRender=!0,result},this.onFiveIntersectionOnModelUpdate=(...params)=>{this.helperController&&this.helperController.onIntersectionOnModelUpdate(...params)};let{camera,model,scene}=five,container=five.getElement();if(this.five=five,!camera||!model||!container||!scene)return;let targetScene=helperGroup==null?scene:helperGroup,onRender=()=>{five.needsRender=!0};this.helperController=new HelperController({camera,model,domEvents:donEvents,originObject3D:object,helperObject3D,container,scene:targetScene,onRender,sharedHooks:hooks,sharedInternalHooks:internalHooks},HelperControllerConfig),five.on(`wantsTapGesture`,this.onFiveWantsTapGesture),five.on(`wantsGesture`,this.onFiveWantsGesture),five.on(`intersectionOnModelUpdate`,this.onFiveIntersectionOnModelUpdate)}dispose(){var _a;this.five.off(`wantsTapGesture`,this.onFiveWantsTapGesture),this.five.off(`wantsGesture`,this.onFiveWantsGesture),this.five.off(`intersectionOnModelUpdate`,this.onFiveIntersectionOnModelUpdate),(_a=this.helperController)==null||_a.dispose()}};exports.ControllerWrapper=ControllerWrapper,exports.FiveControllerWrapper=ControllerWrapper;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */var e=class{constructor(e,t,n,r,i,a,o,s,c){this.onFiveWantsTapGesture=e=>{if(!this.helperController)return;if(this.helperController.preventTapDefaultEvent)return!1;let t=this.helperController.onWantsTapGesture(e);return this.five.needsRender=!0,t},this.onFiveWantsGesture=(...e)=>{if(!this.helperController)return;let t=this.helperController.onWantsGesture(...e);return this.five.needsRender=!0,t},this.onFiveIntersectionOnModelUpdate=(...e)=>{this.helperController&&this.helperController.onIntersectionOnModelUpdate(...e)};let{camera:l,model:u,scene:d}=e,f=e.getElement();if(this.five=e,!l||!u||!f||!d)return;let p=c==null?d:c,m=()=>{e.needsRender=!0};this.helperController=new n({camera:l,model:u,domEvents:t,originObject3D:r,helperObject3D:i,container:f,scene:p,onRender:m,sharedHooks:o,sharedInternalHooks:s},a),e.on(`wantsTapGesture`,this.onFiveWantsTapGesture),e.on(`wantsGesture`,this.onFiveWantsGesture),e.on(`intersectionOnModelUpdate`,this.onFiveIntersectionOnModelUpdate)}dispose(){var e;this.five.off(`wantsTapGesture`,this.onFiveWantsTapGesture),this.five.off(`wantsGesture`,this.onFiveWantsGesture),this.five.off(`intersectionOnModelUpdate`,this.onFiveIntersectionOnModelUpdate),(e=this.helperController)==null||e.dispose()}};export{e as ControllerWrapper,e as FiveControllerWrapper};
338
+ */var ControllerWrapper=class{constructor(five,donEvents,HelperController,object,helperObject3D,HelperControllerConfig,hooks,internalHooks,helperGroup){this.onFiveWantsTapGesture=params=>{if(!this.helperController)return;if(this.helperController.preventTapDefaultEvent)return!1;let result=this.helperController.onWantsTapGesture(params);return this.five.needsRender=!0,result},this.onFiveWantsGesture=(...params)=>{if(!this.helperController)return;let result=this.helperController.onWantsGesture(...params);return this.five.needsRender=!0,result},this.onFiveIntersectionOnModelUpdate=(...params)=>{this.helperController&&this.helperController.onIntersectionOnModelUpdate(...params)};let{camera,model,scene}=five,container=five.getElement();if(this.five=five,!camera||!model||!container||!scene)return;let targetScene=helperGroup==null?scene:helperGroup,onRender=()=>{five.needsRender=!0};this.helperController=new HelperController({camera,model,domEvents:donEvents,originObject3D:object,helperObject3D,container,scene:targetScene,onRender,sharedHooks:hooks,sharedInternalHooks:internalHooks},HelperControllerConfig),five.on(`wantsTapGesture`,this.onFiveWantsTapGesture),five.on(`wantsGesture`,this.onFiveWantsGesture),five.on(`intersectionOnModelUpdate`,this.onFiveIntersectionOnModelUpdate)}dispose(){var _a;this.five.off(`wantsTapGesture`,this.onFiveWantsTapGesture),this.five.off(`wantsGesture`,this.onFiveWantsGesture),this.five.off(`intersectionOnModelUpdate`,this.onFiveIntersectionOnModelUpdate),(_a=this.helperController)==null||_a.dispose()}};export{ControllerWrapper,ControllerWrapper as FiveControllerWrapper};
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */const e=require("../../../_virtual/_rolldown/runtime.js"),t=require("../utils/setObjectQuaternion.js"),n=require("../../../five/utils/isNil.js");let r=require("three/webgpu");r=e.__toESM(r,1);var i=class extends r.Object3D{removeChildren(){for(;this.children.length>0;)this.remove(this.children[0]);return this}add(...e){let t=e.filter(Boolean);return t.length===0?this:super.add(...t)}addIfNotExists(...e){return e.forEach(e=>{this.children.includes(e)||this.add(e)}),this}remove(...e){if(e.length===0)return this;let t=e.filter(Boolean);return super.remove(...t)}removeFromParent(){let e=this.parent;return e!==null&&e.remove(this),this}get helperObject(){return this}constructor(e,t){var n,r;super(),this.originObject3D=e,this.onRender=(n=t==null?void 0:t.onRender)==null?(()=>{}):n,this.positionFrom=(r=t==null?void 0:t.positionFrom)==null?`objectPosition`:r}render(){this.onRender()}enable(){this.parent&&(this.parent.children.includes(this)||this.parent.add(this))}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(e,t=[]){return e.intersectObject(this,!0,t)}initialPosition(e){this.positionFrom===`objectPosition`?this.position.copy(this.originObject3D.position):this.positionFrom===`boundingBox`||this.positionFrom===`boundingSphere`?this.position.copy(new r.Box3().expandByObject(this.originObject3D).getCenter(new r.Vector3)):this.positionFrom instanceof r.Vector3?this.position.copy(this.positionFrom):this.positionFrom instanceof Function&&this.position.copy(this.positionFrom(this.originObject3D)),e&&this.position.add(e)}setScaleByCamera(e){}initQuaternion(e){if(this.quaternion.set(0,0,0,1),e&&(e.xAxis||e.yAxis||e.zAxis)){let t=e.xAxis instanceof Function?e.xAxis():e.xAxis,i=e.yAxis instanceof Function?e.yAxis():e.yAxis,a=e.zAxis instanceof Function?e.zAxis():e.zAxis,o=t==null?void 0:t.clone(),s=i==null?void 0:i.clone(),c=a==null?void 0:a.clone();if(o&&!s&&!s){let e=new r.Quaternion().setFromUnitVectors(new r.Vector3(1,0,0),o.normalize());this.applyQuaternion(e)}if(s&&!o&&!c){let e=new r.Quaternion().setFromUnitVectors(new r.Vector3(0,1,0),s.normalize());this.applyQuaternion(e)}if(c&&!o&&!s){let e=new r.Quaternion().setFromUnitVectors(new r.Vector3(0,0,1),c.normalize());this.applyQuaternion(e)}if([o,s,c].filter(e=>!n.isNil(e)).length>=2){o||(o=new r.Vector3().crossVectors(s,c).normalize()),s||(s=new r.Vector3().crossVectors(o,c).normalize()),c||(c=new r.Vector3().crossVectors(o,s).normalize()),o.applyQuaternion(this.quaternion),s.applyQuaternion(this.quaternion),c.applyQuaternion(this.quaternion);let e=new r.Matrix4().makeBasis(o,s,c),t=new r.Quaternion().setFromRotationMatrix(e);this.quaternion.copy(t)}}}applyHelperScaleMatrix4(e,t){this.scale.applyMatrix4(e)}setHelperQuaternion(e,n){this.initQuaternion(),n?t.default(this,this.quaternion.clone().premultiply(e),n):this.quaternion.premultiply(e)}applyHelperQuaternion(e,t){if(t){let n=new r.Vector3().subVectors(this.position,t).applyQuaternion(e).add(t);this.position.copy(n)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}},a=class extends i{},o=class extends i{},s=class extends i{};exports.BaseHelper=i,exports.BoundingBoxHelperAbstract=o,exports.MoveHelperAbstract=a,exports.RotateHelperAbstract=s;
338
+ */const require_runtime=require("../../../_virtual/_rolldown/runtime.js"),require_setObjectQuaternion=require("../utils/setObjectQuaternion.js"),require_isNil=require("../../../five/utils/isNil.js");let three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);var BaseHelper=class extends three_webgpu.Object3D{removeChildren(){for(;this.children.length>0;)this.remove(this.children[0]);return this}add(...objects){let notNilObjects=objects.filter(Boolean);return notNilObjects.length===0?this:super.add(...notNilObjects)}addIfNotExists(...objects){return objects.forEach(object=>{this.children.includes(object)||this.add(object)}),this}remove(...objects){if(objects.length===0)return this;let notNilObjects=objects.filter(Boolean);return super.remove(...notNilObjects)}removeFromParent(){let parent=this.parent;return parent!==null&&parent.remove(this),this}get helperObject(){return this}constructor(originObject3D,config){var _a,_b;super(),this.originObject3D=originObject3D,this.onRender=(_a=config==null?void 0:config.onRender)==null?(()=>{}):_a,this.positionFrom=(_b=config==null?void 0:config.positionFrom)==null?`objectPosition`:_b}render(){this.onRender()}enable(){this.parent&&(this.parent.children.includes(this)||this.parent.add(this))}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(raycaster,intersection=[]){return raycaster.intersectObject(this,!0,intersection)}initialPosition(offset){this.positionFrom===`objectPosition`?this.position.copy(this.originObject3D.position):this.positionFrom===`boundingBox`||this.positionFrom===`boundingSphere`?this.position.copy(new three_webgpu.Box3().expandByObject(this.originObject3D).getCenter(new three_webgpu.Vector3)):this.positionFrom instanceof three_webgpu.Vector3?this.position.copy(this.positionFrom):this.positionFrom instanceof Function&&this.position.copy(this.positionFrom(this.originObject3D)),offset&&this.position.add(offset)}setScaleByCamera(camera){}initQuaternion(config){if(this.quaternion.set(0,0,0,1),config&&(config.xAxis||config.yAxis||config.zAxis)){let xAxis=config.xAxis instanceof Function?config.xAxis():config.xAxis,yAxis=config.yAxis instanceof Function?config.yAxis():config.yAxis,zAxis=config.zAxis instanceof Function?config.zAxis():config.zAxis,newX=xAxis==null?void 0:xAxis.clone(),newY=yAxis==null?void 0:yAxis.clone(),newZ=zAxis==null?void 0:zAxis.clone();if(newX&&!newY&&!newY){let quaternionX=new three_webgpu.Quaternion().setFromUnitVectors(new three_webgpu.Vector3(1,0,0),newX.normalize());this.applyQuaternion(quaternionX)}if(newY&&!newX&&!newZ){let quaternionY=new three_webgpu.Quaternion().setFromUnitVectors(new three_webgpu.Vector3(0,1,0),newY.normalize());this.applyQuaternion(quaternionY)}if(newZ&&!newX&&!newY){let quaternionZ=new three_webgpu.Quaternion().setFromUnitVectors(new three_webgpu.Vector3(0,0,1),newZ.normalize());this.applyQuaternion(quaternionZ)}if([newX,newY,newZ].filter(v=>!require_isNil.isNil(v)).length>=2){newX||(newX=new three_webgpu.Vector3().crossVectors(newY,newZ).normalize()),newY||(newY=new three_webgpu.Vector3().crossVectors(newX,newZ).normalize()),newZ||(newZ=new three_webgpu.Vector3().crossVectors(newX,newY).normalize()),newX.applyQuaternion(this.quaternion),newY.applyQuaternion(this.quaternion),newZ.applyQuaternion(this.quaternion);let newMatrix=new three_webgpu.Matrix4().makeBasis(newX,newY,newZ),quaternion=new three_webgpu.Quaternion().setFromRotationMatrix(newMatrix);this.quaternion.copy(quaternion)}}}applyHelperScaleMatrix4(matrix,origin){this.scale.applyMatrix4(matrix)}setHelperQuaternion(quaternion,origin){this.initQuaternion(),origin?require_setObjectQuaternion.default(this,this.quaternion.clone().premultiply(quaternion),origin):this.quaternion.premultiply(quaternion)}applyHelperQuaternion(quaternion,origin){if(origin){let v=new three_webgpu.Vector3().subVectors(this.position,origin).applyQuaternion(quaternion).add(origin);this.position.copy(v)}this.applyQuaternion(quaternion)}dispose(){this.removeFromParent()}},MoveHelperAbstract=class extends BaseHelper{},BoundingBoxHelperAbstract=class extends BaseHelper{},RotateHelperAbstract=class extends BaseHelper{};exports.BaseHelper=BaseHelper,exports.BoundingBoxHelperAbstract=BoundingBoxHelperAbstract,exports.MoveHelperAbstract=MoveHelperAbstract,exports.RotateHelperAbstract=RotateHelperAbstract;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */import e from"../utils/setObjectQuaternion.mjs";import{isNil as t}from"../../../five/utils/isNil.mjs";import*as n from"three/webgpu";import{Vector3 as r}from"three/webgpu";var i=class extends n.Object3D{removeChildren(){for(;this.children.length>0;)this.remove(this.children[0]);return this}add(...e){let t=e.filter(Boolean);return t.length===0?this:super.add(...t)}addIfNotExists(...e){return e.forEach(e=>{this.children.includes(e)||this.add(e)}),this}remove(...e){if(e.length===0)return this;let t=e.filter(Boolean);return super.remove(...t)}removeFromParent(){let e=this.parent;return e!==null&&e.remove(this),this}get helperObject(){return this}constructor(e,t){var n,r;super(),this.originObject3D=e,this.onRender=(n=t==null?void 0:t.onRender)==null?(()=>{}):n,this.positionFrom=(r=t==null?void 0:t.positionFrom)==null?`objectPosition`:r}render(){this.onRender()}enable(){this.parent&&(this.parent.children.includes(this)||this.parent.add(this))}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(e,t=[]){return e.intersectObject(this,!0,t)}initialPosition(e){this.positionFrom===`objectPosition`?this.position.copy(this.originObject3D.position):this.positionFrom===`boundingBox`||this.positionFrom===`boundingSphere`?this.position.copy(new n.Box3().expandByObject(this.originObject3D).getCenter(new n.Vector3)):this.positionFrom instanceof r?this.position.copy(this.positionFrom):this.positionFrom instanceof Function&&this.position.copy(this.positionFrom(this.originObject3D)),e&&this.position.add(e)}setScaleByCamera(e){}initQuaternion(e){if(this.quaternion.set(0,0,0,1),e&&(e.xAxis||e.yAxis||e.zAxis)){let r=e.xAxis instanceof Function?e.xAxis():e.xAxis,i=e.yAxis instanceof Function?e.yAxis():e.yAxis,a=e.zAxis instanceof Function?e.zAxis():e.zAxis,o=r==null?void 0:r.clone(),s=i==null?void 0:i.clone(),c=a==null?void 0:a.clone();if(o&&!s&&!s){let e=new n.Quaternion().setFromUnitVectors(new n.Vector3(1,0,0),o.normalize());this.applyQuaternion(e)}if(s&&!o&&!c){let e=new n.Quaternion().setFromUnitVectors(new n.Vector3(0,1,0),s.normalize());this.applyQuaternion(e)}if(c&&!o&&!s){let e=new n.Quaternion().setFromUnitVectors(new n.Vector3(0,0,1),c.normalize());this.applyQuaternion(e)}if([o,s,c].filter(e=>!t(e)).length>=2){o||(o=new n.Vector3().crossVectors(s,c).normalize()),s||(s=new n.Vector3().crossVectors(o,c).normalize()),c||(c=new n.Vector3().crossVectors(o,s).normalize()),o.applyQuaternion(this.quaternion),s.applyQuaternion(this.quaternion),c.applyQuaternion(this.quaternion);let e=new n.Matrix4().makeBasis(o,s,c),t=new n.Quaternion().setFromRotationMatrix(e);this.quaternion.copy(t)}}}applyHelperScaleMatrix4(e,t){this.scale.applyMatrix4(e)}setHelperQuaternion(t,n){this.initQuaternion(),n?e(this,this.quaternion.clone().premultiply(t),n):this.quaternion.premultiply(t)}applyHelperQuaternion(e,t){if(t){let n=new r().subVectors(this.position,t).applyQuaternion(e).add(t);this.position.copy(n)}this.applyQuaternion(e)}dispose(){this.removeFromParent()}},a=class extends i{},o=class extends i{},s=class extends i{};export{i as BaseHelper,o as BoundingBoxHelperAbstract,a as MoveHelperAbstract,s as RotateHelperAbstract};
338
+ */import setObjectQuaternion from"../utils/setObjectQuaternion.mjs";import{isNil}from"../../../five/utils/isNil.mjs";import*as THREE from"three/webgpu";import{Vector3}from"three/webgpu";var BaseHelper=class extends THREE.Object3D{removeChildren(){for(;this.children.length>0;)this.remove(this.children[0]);return this}add(...objects){let notNilObjects=objects.filter(Boolean);return notNilObjects.length===0?this:super.add(...notNilObjects)}addIfNotExists(...objects){return objects.forEach(object=>{this.children.includes(object)||this.add(object)}),this}remove(...objects){if(objects.length===0)return this;let notNilObjects=objects.filter(Boolean);return super.remove(...notNilObjects)}removeFromParent(){let parent=this.parent;return parent!==null&&parent.remove(this),this}get helperObject(){return this}constructor(originObject3D,config){var _a,_b;super(),this.originObject3D=originObject3D,this.onRender=(_a=config==null?void 0:config.onRender)==null?(()=>{}):_a,this.positionFrom=(_b=config==null?void 0:config.positionFrom)==null?`objectPosition`:_b}render(){this.onRender()}enable(){this.parent&&(this.parent.children.includes(this)||this.parent.add(this))}disable(){this.removeFromParent()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}raycasterIntersectObject(raycaster,intersection=[]){return raycaster.intersectObject(this,!0,intersection)}initialPosition(offset){this.positionFrom===`objectPosition`?this.position.copy(this.originObject3D.position):this.positionFrom===`boundingBox`||this.positionFrom===`boundingSphere`?this.position.copy(new THREE.Box3().expandByObject(this.originObject3D).getCenter(new THREE.Vector3)):this.positionFrom instanceof Vector3?this.position.copy(this.positionFrom):this.positionFrom instanceof Function&&this.position.copy(this.positionFrom(this.originObject3D)),offset&&this.position.add(offset)}setScaleByCamera(camera){}initQuaternion(config){if(this.quaternion.set(0,0,0,1),config&&(config.xAxis||config.yAxis||config.zAxis)){let xAxis=config.xAxis instanceof Function?config.xAxis():config.xAxis,yAxis=config.yAxis instanceof Function?config.yAxis():config.yAxis,zAxis=config.zAxis instanceof Function?config.zAxis():config.zAxis,newX=xAxis==null?void 0:xAxis.clone(),newY=yAxis==null?void 0:yAxis.clone(),newZ=zAxis==null?void 0:zAxis.clone();if(newX&&!newY&&!newY){let quaternionX=new THREE.Quaternion().setFromUnitVectors(new THREE.Vector3(1,0,0),newX.normalize());this.applyQuaternion(quaternionX)}if(newY&&!newX&&!newZ){let quaternionY=new THREE.Quaternion().setFromUnitVectors(new THREE.Vector3(0,1,0),newY.normalize());this.applyQuaternion(quaternionY)}if(newZ&&!newX&&!newY){let quaternionZ=new THREE.Quaternion().setFromUnitVectors(new THREE.Vector3(0,0,1),newZ.normalize());this.applyQuaternion(quaternionZ)}if([newX,newY,newZ].filter(v=>!isNil(v)).length>=2){newX||(newX=new THREE.Vector3().crossVectors(newY,newZ).normalize()),newY||(newY=new THREE.Vector3().crossVectors(newX,newZ).normalize()),newZ||(newZ=new THREE.Vector3().crossVectors(newX,newY).normalize()),newX.applyQuaternion(this.quaternion),newY.applyQuaternion(this.quaternion),newZ.applyQuaternion(this.quaternion);let newMatrix=new THREE.Matrix4().makeBasis(newX,newY,newZ),quaternion=new THREE.Quaternion().setFromRotationMatrix(newMatrix);this.quaternion.copy(quaternion)}}}applyHelperScaleMatrix4(matrix,origin){this.scale.applyMatrix4(matrix)}setHelperQuaternion(quaternion,origin){this.initQuaternion(),origin?setObjectQuaternion(this,this.quaternion.clone().premultiply(quaternion),origin):this.quaternion.premultiply(quaternion)}applyHelperQuaternion(quaternion,origin){if(origin){let v=new Vector3().subVectors(this.position,origin).applyQuaternion(quaternion).add(origin);this.position.copy(v)}this.applyQuaternion(quaternion)}dispose(){this.removeFromParent()}},MoveHelperAbstract=class extends BaseHelper{},BoundingBoxHelperAbstract=class extends BaseHelper{},RotateHelperAbstract=class extends BaseHelper{};export{BaseHelper,BoundingBoxHelperAbstract,MoveHelperAbstract,RotateHelperAbstract};
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */const e=require("../../../_virtual/_rolldown/runtime.js"),t=require("../utils/setObjectQuaternion.js"),n=require("./BaseHelper.js");let r=require("three/webgpu");r=e.__toESM(r,1);var i=class extends n.BoundingBoxHelperAbstract{constructor(e){super(e),this.name=`BoundingBoxHelper`,this.positionAttribute=new r.BufferAttribute(new Float32Array(24),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion),this.scale.copy(this.originObject3D.scale)}setHelperQuaternion(e,n){t.default(this,e,n)}raycasterIntersectObject(e,t){return e.intersectObject(this,!1,t)}raycast(e,t){this.box.raycast(e,t)}update(){let e=new r.Box3,t=new r.Matrix4().copy(this.originObject3D.matrixWorld).invert(),n=new r.Vector3;if(this.originObject3D.updateMatrixWorld(!0),this.originObject3D.traverse(i=>{let a=i.geometry;if(!a)return;i.updateMatrixWorld(!0);let o=new r.Matrix4().multiplyMatrices(t,i.matrixWorld);if(a.isBufferGeometry){let t=a,r=t.attributes.position;if(r)for(let t=0,i=r.count;t<i;t++)n.fromBufferAttribute(r,t).applyMatrix4(o),e.expandByPoint(n);let i=t.attributes.instanceStart,s=t.attributes.instanceEnd;if(i)for(let t=0,r=i.count;t<r;t++)n.fromBufferAttribute(i,t).applyMatrix4(o),e.expandByPoint(n);if(s)for(let t=0,r=s.count;t<r;t++)n.fromBufferAttribute(s,t).applyMatrix4(o),e.expandByPoint(n)}else if(a.vertices){let t=a.vertices;for(let r of t)n.copy(r).applyMatrix4(o),e.expandByPoint(n)}}),e.isEmpty())return;let{min:i,max:a}=e;this.positionAttribute.setXYZ(0,a.x,a.y,a.z),this.positionAttribute.setXYZ(1,i.x,a.y,a.z),this.positionAttribute.setXYZ(2,i.x,i.y,a.z),this.positionAttribute.setXYZ(3,a.x,i.y,a.z),this.positionAttribute.setXYZ(4,a.x,a.y,i.z),this.positionAttribute.setXYZ(5,i.x,a.y,i.z),this.positionAttribute.setXYZ(6,i.x,i.y,i.z),this.positionAttribute.setXYZ(7,a.x,i.y,i.z),this.positionAttribute.needsUpdate=!0}createOutline(){let e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),t=new r.BufferGeometry;t.setIndex(new r.BufferAttribute(e,1)),t.setAttribute(`position`,this.positionAttribute);let n=new r.LineBasicMaterial({color:64767,linewidth:1,opacity:1,toneMapped:!1}),i=new r.LineSegments(t,n);return i.matrixAutoUpdate=!1,i}createBox(){let e=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),t=new r.BufferGeometry;t.setIndex(new r.BufferAttribute(e,1)),t.setAttribute(`position`,this.positionAttribute);let n=new r.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new r.Mesh(t,n)}};exports.BoundingBoxHelper=i;
338
+ */const require_runtime=require("../../../_virtual/_rolldown/runtime.js"),require_setObjectQuaternion=require("../utils/setObjectQuaternion.js"),require_BaseHelper=require("./BaseHelper.js");let three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);var BoundingBoxHelper=class extends require_BaseHelper.BoundingBoxHelperAbstract{constructor(originObject){super(originObject),this.name=`BoundingBoxHelper`,this.positionAttribute=new three_webgpu.BufferAttribute(new Float32Array(24),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion),this.scale.copy(this.originObject3D.scale)}setHelperQuaternion(quaternion,origin){require_setObjectQuaternion.default(this,quaternion,origin)}raycasterIntersectObject(raycaster,intersection){return raycaster.intersectObject(this,!1,intersection)}raycast(raycaster,intersects){this.box.raycast(raycaster,intersects)}update(){let localBox=new three_webgpu.Box3,inverseMatrix=new three_webgpu.Matrix4().copy(this.originObject3D.matrixWorld).invert(),vertex=new three_webgpu.Vector3;if(this.originObject3D.updateMatrixWorld(!0),this.originObject3D.traverse(child=>{let geometry=child.geometry;if(!geometry)return;child.updateMatrixWorld(!0);let toLocal=new three_webgpu.Matrix4().multiplyMatrices(inverseMatrix,child.matrixWorld);if(geometry.isBufferGeometry){let bufGeom=geometry,position=bufGeom.attributes.position;if(position)for(let i=0,l=position.count;i<l;i++)vertex.fromBufferAttribute(position,i).applyMatrix4(toLocal),localBox.expandByPoint(vertex);let instanceStart=bufGeom.attributes.instanceStart,instanceEnd=bufGeom.attributes.instanceEnd;if(instanceStart)for(let i=0,l=instanceStart.count;i<l;i++)vertex.fromBufferAttribute(instanceStart,i).applyMatrix4(toLocal),localBox.expandByPoint(vertex);if(instanceEnd)for(let i=0,l=instanceEnd.count;i<l;i++)vertex.fromBufferAttribute(instanceEnd,i).applyMatrix4(toLocal),localBox.expandByPoint(vertex)}else if(geometry.vertices){let vertices=geometry.vertices;for(let v of vertices)vertex.copy(v).applyMatrix4(toLocal),localBox.expandByPoint(vertex)}}),localBox.isEmpty())return;let{min,max}=localBox;this.positionAttribute.setXYZ(0,max.x,max.y,max.z),this.positionAttribute.setXYZ(1,min.x,max.y,max.z),this.positionAttribute.setXYZ(2,min.x,min.y,max.z),this.positionAttribute.setXYZ(3,max.x,min.y,max.z),this.positionAttribute.setXYZ(4,max.x,max.y,min.z),this.positionAttribute.setXYZ(5,min.x,max.y,min.z),this.positionAttribute.setXYZ(6,min.x,min.y,min.z),this.positionAttribute.setXYZ(7,max.x,min.y,min.z),this.positionAttribute.needsUpdate=!0}createOutline(){let lineIndices=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),lineGeometry=new three_webgpu.BufferGeometry;lineGeometry.setIndex(new three_webgpu.BufferAttribute(lineIndices,1)),lineGeometry.setAttribute(`position`,this.positionAttribute);let lineMaterial=new three_webgpu.LineBasicMaterial({color:64767,linewidth:1,opacity:1,toneMapped:!1}),lineSegments=new three_webgpu.LineSegments(lineGeometry,lineMaterial);return lineSegments.matrixAutoUpdate=!1,lineSegments}createBox(){let boxIndices=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),boxGeometry=new three_webgpu.BufferGeometry;boxGeometry.setIndex(new three_webgpu.BufferAttribute(boxIndices,1)),boxGeometry.setAttribute(`position`,this.positionAttribute);let boxMaterial=new three_webgpu.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new three_webgpu.Mesh(boxGeometry,boxMaterial)}};exports.BoundingBoxHelper=BoundingBoxHelper;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */import e from"../utils/setObjectQuaternion.mjs";import{BoundingBoxHelperAbstract as t}from"./BaseHelper.mjs";import*as n from"three/webgpu";var r=class extends t{constructor(e){super(e),this.name=`BoundingBoxHelper`,this.positionAttribute=new n.BufferAttribute(new Float32Array(24),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion),this.scale.copy(this.originObject3D.scale)}setHelperQuaternion(t,n){e(this,t,n)}raycasterIntersectObject(e,t){return e.intersectObject(this,!1,t)}raycast(e,t){this.box.raycast(e,t)}update(){let e=new n.Box3,t=new n.Matrix4().copy(this.originObject3D.matrixWorld).invert(),r=new n.Vector3;if(this.originObject3D.updateMatrixWorld(!0),this.originObject3D.traverse(i=>{let a=i.geometry;if(!a)return;i.updateMatrixWorld(!0);let o=new n.Matrix4().multiplyMatrices(t,i.matrixWorld);if(a.isBufferGeometry){let t=a,n=t.attributes.position;if(n)for(let t=0,i=n.count;t<i;t++)r.fromBufferAttribute(n,t).applyMatrix4(o),e.expandByPoint(r);let i=t.attributes.instanceStart,s=t.attributes.instanceEnd;if(i)for(let t=0,n=i.count;t<n;t++)r.fromBufferAttribute(i,t).applyMatrix4(o),e.expandByPoint(r);if(s)for(let t=0,n=s.count;t<n;t++)r.fromBufferAttribute(s,t).applyMatrix4(o),e.expandByPoint(r)}else if(a.vertices){let t=a.vertices;for(let n of t)r.copy(n).applyMatrix4(o),e.expandByPoint(r)}}),e.isEmpty())return;let{min:i,max:a}=e;this.positionAttribute.setXYZ(0,a.x,a.y,a.z),this.positionAttribute.setXYZ(1,i.x,a.y,a.z),this.positionAttribute.setXYZ(2,i.x,i.y,a.z),this.positionAttribute.setXYZ(3,a.x,i.y,a.z),this.positionAttribute.setXYZ(4,a.x,a.y,i.z),this.positionAttribute.setXYZ(5,i.x,a.y,i.z),this.positionAttribute.setXYZ(6,i.x,i.y,i.z),this.positionAttribute.setXYZ(7,a.x,i.y,i.z),this.positionAttribute.needsUpdate=!0}createOutline(){let e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),t=new n.BufferGeometry;t.setIndex(new n.BufferAttribute(e,1)),t.setAttribute(`position`,this.positionAttribute);let r=new n.LineBasicMaterial({color:64767,linewidth:1,opacity:1,toneMapped:!1}),i=new n.LineSegments(t,r);return i.matrixAutoUpdate=!1,i}createBox(){let e=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),t=new n.BufferGeometry;t.setIndex(new n.BufferAttribute(e,1)),t.setAttribute(`position`,this.positionAttribute);let r=new n.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new n.Mesh(t,r)}};export{r as BoundingBoxHelper};
338
+ */import setObjectQuaternion from"../utils/setObjectQuaternion.mjs";import{BoundingBoxHelperAbstract}from"./BaseHelper.mjs";import*as THREE from"three/webgpu";var BoundingBoxHelper=class extends BoundingBoxHelperAbstract{constructor(originObject){super(originObject),this.name=`BoundingBoxHelper`,this.positionAttribute=new THREE.BufferAttribute(new Float32Array(24),3),this.box=this.createBox(),this.outline=this.createOutline(),this.add(this.box,this.outline),this.update()}initQuaternion(){this.quaternion.copy(this.originObject3D.quaternion),this.scale.copy(this.originObject3D.scale)}setHelperQuaternion(quaternion,origin){setObjectQuaternion(this,quaternion,origin)}raycasterIntersectObject(raycaster,intersection){return raycaster.intersectObject(this,!1,intersection)}raycast(raycaster,intersects){this.box.raycast(raycaster,intersects)}update(){let localBox=new THREE.Box3,inverseMatrix=new THREE.Matrix4().copy(this.originObject3D.matrixWorld).invert(),vertex=new THREE.Vector3;if(this.originObject3D.updateMatrixWorld(!0),this.originObject3D.traverse(child=>{let geometry=child.geometry;if(!geometry)return;child.updateMatrixWorld(!0);let toLocal=new THREE.Matrix4().multiplyMatrices(inverseMatrix,child.matrixWorld);if(geometry.isBufferGeometry){let bufGeom=geometry,position=bufGeom.attributes.position;if(position)for(let i=0,l=position.count;i<l;i++)vertex.fromBufferAttribute(position,i).applyMatrix4(toLocal),localBox.expandByPoint(vertex);let instanceStart=bufGeom.attributes.instanceStart,instanceEnd=bufGeom.attributes.instanceEnd;if(instanceStart)for(let i=0,l=instanceStart.count;i<l;i++)vertex.fromBufferAttribute(instanceStart,i).applyMatrix4(toLocal),localBox.expandByPoint(vertex);if(instanceEnd)for(let i=0,l=instanceEnd.count;i<l;i++)vertex.fromBufferAttribute(instanceEnd,i).applyMatrix4(toLocal),localBox.expandByPoint(vertex)}else if(geometry.vertices){let vertices=geometry.vertices;for(let v of vertices)vertex.copy(v).applyMatrix4(toLocal),localBox.expandByPoint(vertex)}}),localBox.isEmpty())return;let{min,max}=localBox;this.positionAttribute.setXYZ(0,max.x,max.y,max.z),this.positionAttribute.setXYZ(1,min.x,max.y,max.z),this.positionAttribute.setXYZ(2,min.x,min.y,max.z),this.positionAttribute.setXYZ(3,max.x,min.y,max.z),this.positionAttribute.setXYZ(4,max.x,max.y,min.z),this.positionAttribute.setXYZ(5,min.x,max.y,min.z),this.positionAttribute.setXYZ(6,min.x,min.y,min.z),this.positionAttribute.setXYZ(7,max.x,min.y,min.z),this.positionAttribute.needsUpdate=!0}createOutline(){let lineIndices=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),lineGeometry=new THREE.BufferGeometry;lineGeometry.setIndex(new THREE.BufferAttribute(lineIndices,1)),lineGeometry.setAttribute(`position`,this.positionAttribute);let lineMaterial=new THREE.LineBasicMaterial({color:64767,linewidth:1,opacity:1,toneMapped:!1}),lineSegments=new THREE.LineSegments(lineGeometry,lineMaterial);return lineSegments.matrixAutoUpdate=!1,lineSegments}createBox(){let boxIndices=new Uint16Array([0,1,2,0,2,3,0,3,7,0,7,4,0,4,5,0,5,1,6,1,5,6,2,1,6,5,4,6,4,7,6,3,2,6,7,3]),boxGeometry=new THREE.BufferGeometry;boxGeometry.setIndex(new THREE.BufferAttribute(boxIndices,1)),boxGeometry.setAttribute(`position`,this.positionAttribute);let boxMaterial=new THREE.MeshBasicMaterial({color:64767,opacity:.1,depthTest:!1,transparent:!0});return new THREE.Mesh(boxGeometry,boxMaterial)}};export{BoundingBoxHelper};
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */const e=require("../../../_virtual/_rolldown/runtime.js"),t=require("./BaseHelper.js"),n=require("../constant.js"),r=require("../utils/ArrowGroup.js"),i=require("../utils/CenterHandle.js"),a=require("../utils/PlaneHandle.js"),o=require("../utils/calculateScaleByCamera.js"),s=require("../utils/getOrthographicCameraDirection.js"),c=require("../utils/tipsDom.js");let l=require("three/webgpu");l=e.__toESM(l,1);var u=class extends t.MoveHelperAbstract{constructor(e,t){super(e,t),this.name=`MoveHelper`,(t==null?void 0:t.xArrowEnable)!==!1&&(this.xArrow=new r.ArrowGroup({direction:`x`,color:n.AXES_THREE_COLOR.X})),(t==null?void 0:t.yArrowEnable)!==!1&&(this.yArrow=new r.ArrowGroup({direction:`y`,color:n.AXES_THREE_COLOR.Y})),(t==null?void 0:t.zArrowEnable)!==!1&&(this.zArrow=new r.ArrowGroup({direction:`z`,color:n.AXES_THREE_COLOR.Z})),(t==null?void 0:t.centerHandleEnable)!==!1&&(this.centerHandle=new i.CenterHandle),(t==null?void 0:t.xyPlaneEnable)!==!1&&(this.xyPlane=new a.PlaneHandle({direction:`xy`,color:n.AXES_THREE_COLOR.Z})),(t==null?void 0:t.xzPlaneEnable)!==!1&&(this.xzPlane=new a.PlaneHandle({direction:`xz`,color:n.AXES_THREE_COLOR.Y})),(t==null?void 0:t.yzPlaneEnable)!==!1&&(this.yzPlane=new a.PlaneHandle({direction:`yz`,color:n.AXES_THREE_COLOR.X})),t!=null&&t.container&&(t==null?void 0:t.moveTipsEnable)!==!1&&(this.container=t.container,this.moveTips=c.tipsDom({display:`none`}),this.container.appendChild(this.moveTips.element)),this.add(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle,this.xyPlane,this.xzPlane,this.yzPlane].filter(Boolean))}update(e){if(this.xArrow&&(this.xArrow.visible=!0),this.yArrow&&(this.yArrow.visible=!0),this.zArrow&&(this.zArrow.visible=!0),this.centerHandle&&this.centerHandle.update(e),e.type===`OrthographicCamera`){let t=new l.Vector3(1,0,0).applyQuaternion(this.quaternion),n=new l.Vector3(0,1,0).applyQuaternion(this.quaternion),r=new l.Vector3(0,0,1).applyQuaternion(this.quaternion),i=e.pose,a=s.getOrthographicCameraDirection(i),o=.0872665;Math.abs(t.angleTo(a)-0)<o||Math.abs(t.angleTo(a)-Math.PI)<o?this.xArrow&&(this.xArrow.visible=!1):Math.abs(n.angleTo(a)-0)<o||Math.abs(n.angleTo(a)-Math.PI)<o?this.yArrow&&(this.yArrow.visible=!1):(Math.abs(r.angleTo(a)-0)<o||Math.abs(r.angleTo(a)-Math.PI)<o)&&this.zArrow&&(this.zArrow.visible=!1)}}show(){var e;super.show(),this.xArrow&&this.add(this.xArrow),this.yArrow&&this.add(this.yArrow),this.zArrow&&this.add(this.zArrow),this.centerHandle&&this.add(this.centerHandle),this.xyPlane&&this.add(this.xyPlane),this.xzPlane&&this.add(this.xzPlane),this.yzPlane&&this.add(this.yzPlane),(e=this.moveTips)==null||e.hide()}setScaleByCamera(e){this.scale.setScalar(o.default(e,this.position))}showDraggingHelper(e){this.xArrow&&(e.includes(`x`)?this.add(this.xArrow):this.remove(this.xArrow)),this.yArrow&&(e.includes(`y`)?this.add(this.yArrow):this.remove(this.yArrow)),this.zArrow&&(e.includes(`z`)?this.add(this.zArrow):this.remove(this.zArrow)),this.centerHandle&&(e.includes(`plane`)?this.add(this.centerHandle):this.remove(this.centerHandle)),this.xyPlane&&(e.includes(`xy`)?this.add(this.xyPlane):this.remove(this.xyPlane)),this.xzPlane&&(e.includes(`xz`)?this.add(this.xzPlane):this.remove(this.xzPlane)),this.yzPlane&&(e.includes(`yz`)?this.add(this.yzPlane):this.remove(this.yzPlane))}dispose(){var e,t;this.remove(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle,this.xyPlane,this.xzPlane,this.yzPlane].filter(Boolean)),(t=(e=this.moveTips)==null?void 0:e.element)==null||t.remove(),super.dispose()}};exports.MoveHelper=u;
338
+ */const require_runtime=require("../../../_virtual/_rolldown/runtime.js"),require_BaseHelper=require("./BaseHelper.js"),require_constant=require("../constant.js"),require_ArrowGroup=require("../utils/ArrowGroup.js"),require_CenterHandle=require("../utils/CenterHandle.js"),require_PlaneHandle=require("../utils/PlaneHandle.js"),require_calculateScaleByCamera=require("../utils/calculateScaleByCamera.js"),require_getOrthographicCameraDirection=require("../utils/getOrthographicCameraDirection.js"),require_tipsDom=require("../utils/tipsDom.js");let three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);var MoveHelper=class extends require_BaseHelper.MoveHelperAbstract{constructor(originObject3D,config){super(originObject3D,config),this.name=`MoveHelper`,(config==null?void 0:config.xArrowEnable)!==!1&&(this.xArrow=new require_ArrowGroup.ArrowGroup({direction:`x`,color:require_constant.AXES_THREE_COLOR.X})),(config==null?void 0:config.yArrowEnable)!==!1&&(this.yArrow=new require_ArrowGroup.ArrowGroup({direction:`y`,color:require_constant.AXES_THREE_COLOR.Y})),(config==null?void 0:config.zArrowEnable)!==!1&&(this.zArrow=new require_ArrowGroup.ArrowGroup({direction:`z`,color:require_constant.AXES_THREE_COLOR.Z})),(config==null?void 0:config.centerHandleEnable)!==!1&&(this.centerHandle=new require_CenterHandle.CenterHandle),(config==null?void 0:config.xyPlaneEnable)!==!1&&(this.xyPlane=new require_PlaneHandle.PlaneHandle({direction:`xy`,color:require_constant.AXES_THREE_COLOR.Z})),(config==null?void 0:config.xzPlaneEnable)!==!1&&(this.xzPlane=new require_PlaneHandle.PlaneHandle({direction:`xz`,color:require_constant.AXES_THREE_COLOR.Y})),(config==null?void 0:config.yzPlaneEnable)!==!1&&(this.yzPlane=new require_PlaneHandle.PlaneHandle({direction:`yz`,color:require_constant.AXES_THREE_COLOR.X})),config!=null&&config.container&&(config==null?void 0:config.moveTipsEnable)!==!1&&(this.container=config.container,this.moveTips=require_tipsDom.tipsDom({display:`none`}),this.container.appendChild(this.moveTips.element)),this.add(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle,this.xyPlane,this.xzPlane,this.yzPlane].filter(Boolean))}update(camera){if(this.xArrow&&(this.xArrow.visible=!0),this.yArrow&&(this.yArrow.visible=!0),this.zArrow&&(this.zArrow.visible=!0),this.centerHandle&&this.centerHandle.update(camera),camera.type===`OrthographicCamera`){let worldDirectionX=new three_webgpu.Vector3(1,0,0).applyQuaternion(this.quaternion),worldDirectionY=new three_webgpu.Vector3(0,1,0).applyQuaternion(this.quaternion),worldDirectionZ=new three_webgpu.Vector3(0,0,1).applyQuaternion(this.quaternion),pose=camera.pose,orthographicCameraDirection=require_getOrthographicCameraDirection.getOrthographicCameraDirection(pose),hideThreshold=.0872665;Math.abs(worldDirectionX.angleTo(orthographicCameraDirection)-0)<hideThreshold||Math.abs(worldDirectionX.angleTo(orthographicCameraDirection)-Math.PI)<hideThreshold?this.xArrow&&(this.xArrow.visible=!1):Math.abs(worldDirectionY.angleTo(orthographicCameraDirection)-0)<hideThreshold||Math.abs(worldDirectionY.angleTo(orthographicCameraDirection)-Math.PI)<hideThreshold?this.yArrow&&(this.yArrow.visible=!1):(Math.abs(worldDirectionZ.angleTo(orthographicCameraDirection)-0)<hideThreshold||Math.abs(worldDirectionZ.angleTo(orthographicCameraDirection)-Math.PI)<hideThreshold)&&this.zArrow&&(this.zArrow.visible=!1)}}show(){var _a;super.show(),this.xArrow&&this.add(this.xArrow),this.yArrow&&this.add(this.yArrow),this.zArrow&&this.add(this.zArrow),this.centerHandle&&this.add(this.centerHandle),this.xyPlane&&this.add(this.xyPlane),this.xzPlane&&this.add(this.xzPlane),this.yzPlane&&this.add(this.yzPlane),(_a=this.moveTips)==null||_a.hide()}setScaleByCamera(camera){this.scale.setScalar(require_calculateScaleByCamera.default(camera,this.position))}showDraggingHelper(directions){this.xArrow&&(directions.includes(`x`)?this.add(this.xArrow):this.remove(this.xArrow)),this.yArrow&&(directions.includes(`y`)?this.add(this.yArrow):this.remove(this.yArrow)),this.zArrow&&(directions.includes(`z`)?this.add(this.zArrow):this.remove(this.zArrow)),this.centerHandle&&(directions.includes(`plane`)?this.add(this.centerHandle):this.remove(this.centerHandle)),this.xyPlane&&(directions.includes(`xy`)?this.add(this.xyPlane):this.remove(this.xyPlane)),this.xzPlane&&(directions.includes(`xz`)?this.add(this.xzPlane):this.remove(this.xzPlane)),this.yzPlane&&(directions.includes(`yz`)?this.add(this.yzPlane):this.remove(this.yzPlane))}dispose(){var _a,_b;this.remove(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle,this.xyPlane,this.xzPlane,this.yzPlane].filter(Boolean)),(_b=(_a=this.moveTips)==null?void 0:_a.element)==null||_b.remove(),super.dispose()}};exports.MoveHelper=MoveHelper;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */import{MoveHelperAbstract as e}from"./BaseHelper.mjs";import{AXES_THREE_COLOR as t}from"../constant.mjs";import{ArrowGroup as n}from"../utils/ArrowGroup.mjs";import{CenterHandle as r}from"../utils/CenterHandle.mjs";import{PlaneHandle as i}from"../utils/PlaneHandle.mjs";import a from"../utils/calculateScaleByCamera.mjs";import{getOrthographicCameraDirection as o}from"../utils/getOrthographicCameraDirection.mjs";import{tipsDom as s}from"../utils/tipsDom.mjs";import*as c from"three/webgpu";var l=class extends e{constructor(e,a){super(e,a),this.name=`MoveHelper`,(a==null?void 0:a.xArrowEnable)!==!1&&(this.xArrow=new n({direction:`x`,color:t.X})),(a==null?void 0:a.yArrowEnable)!==!1&&(this.yArrow=new n({direction:`y`,color:t.Y})),(a==null?void 0:a.zArrowEnable)!==!1&&(this.zArrow=new n({direction:`z`,color:t.Z})),(a==null?void 0:a.centerHandleEnable)!==!1&&(this.centerHandle=new r),(a==null?void 0:a.xyPlaneEnable)!==!1&&(this.xyPlane=new i({direction:`xy`,color:t.Z})),(a==null?void 0:a.xzPlaneEnable)!==!1&&(this.xzPlane=new i({direction:`xz`,color:t.Y})),(a==null?void 0:a.yzPlaneEnable)!==!1&&(this.yzPlane=new i({direction:`yz`,color:t.X})),a!=null&&a.container&&(a==null?void 0:a.moveTipsEnable)!==!1&&(this.container=a.container,this.moveTips=s({display:`none`}),this.container.appendChild(this.moveTips.element)),this.add(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle,this.xyPlane,this.xzPlane,this.yzPlane].filter(Boolean))}update(e){if(this.xArrow&&(this.xArrow.visible=!0),this.yArrow&&(this.yArrow.visible=!0),this.zArrow&&(this.zArrow.visible=!0),this.centerHandle&&this.centerHandle.update(e),e.type===`OrthographicCamera`){let t=new c.Vector3(1,0,0).applyQuaternion(this.quaternion),n=new c.Vector3(0,1,0).applyQuaternion(this.quaternion),r=new c.Vector3(0,0,1).applyQuaternion(this.quaternion),i=e.pose,a=o(i),s=.0872665;Math.abs(t.angleTo(a)-0)<s||Math.abs(t.angleTo(a)-Math.PI)<s?this.xArrow&&(this.xArrow.visible=!1):Math.abs(n.angleTo(a)-0)<s||Math.abs(n.angleTo(a)-Math.PI)<s?this.yArrow&&(this.yArrow.visible=!1):(Math.abs(r.angleTo(a)-0)<s||Math.abs(r.angleTo(a)-Math.PI)<s)&&this.zArrow&&(this.zArrow.visible=!1)}}show(){var e;super.show(),this.xArrow&&this.add(this.xArrow),this.yArrow&&this.add(this.yArrow),this.zArrow&&this.add(this.zArrow),this.centerHandle&&this.add(this.centerHandle),this.xyPlane&&this.add(this.xyPlane),this.xzPlane&&this.add(this.xzPlane),this.yzPlane&&this.add(this.yzPlane),(e=this.moveTips)==null||e.hide()}setScaleByCamera(e){this.scale.setScalar(a(e,this.position))}showDraggingHelper(e){this.xArrow&&(e.includes(`x`)?this.add(this.xArrow):this.remove(this.xArrow)),this.yArrow&&(e.includes(`y`)?this.add(this.yArrow):this.remove(this.yArrow)),this.zArrow&&(e.includes(`z`)?this.add(this.zArrow):this.remove(this.zArrow)),this.centerHandle&&(e.includes(`plane`)?this.add(this.centerHandle):this.remove(this.centerHandle)),this.xyPlane&&(e.includes(`xy`)?this.add(this.xyPlane):this.remove(this.xyPlane)),this.xzPlane&&(e.includes(`xz`)?this.add(this.xzPlane):this.remove(this.xzPlane)),this.yzPlane&&(e.includes(`yz`)?this.add(this.yzPlane):this.remove(this.yzPlane))}dispose(){var e,t;this.remove(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle,this.xyPlane,this.xzPlane,this.yzPlane].filter(Boolean)),(t=(e=this.moveTips)==null?void 0:e.element)==null||t.remove(),super.dispose()}};export{l as MoveHelper};
338
+ */import{MoveHelperAbstract}from"./BaseHelper.mjs";import{AXES_THREE_COLOR}from"../constant.mjs";import{ArrowGroup}from"../utils/ArrowGroup.mjs";import{CenterHandle}from"../utils/CenterHandle.mjs";import{PlaneHandle}from"../utils/PlaneHandle.mjs";import calculateScaleByCamera from"../utils/calculateScaleByCamera.mjs";import{getOrthographicCameraDirection}from"../utils/getOrthographicCameraDirection.mjs";import{tipsDom}from"../utils/tipsDom.mjs";import*as THREE from"three/webgpu";var MoveHelper=class extends MoveHelperAbstract{constructor(originObject3D,config){super(originObject3D,config),this.name=`MoveHelper`,(config==null?void 0:config.xArrowEnable)!==!1&&(this.xArrow=new ArrowGroup({direction:`x`,color:AXES_THREE_COLOR.X})),(config==null?void 0:config.yArrowEnable)!==!1&&(this.yArrow=new ArrowGroup({direction:`y`,color:AXES_THREE_COLOR.Y})),(config==null?void 0:config.zArrowEnable)!==!1&&(this.zArrow=new ArrowGroup({direction:`z`,color:AXES_THREE_COLOR.Z})),(config==null?void 0:config.centerHandleEnable)!==!1&&(this.centerHandle=new CenterHandle),(config==null?void 0:config.xyPlaneEnable)!==!1&&(this.xyPlane=new PlaneHandle({direction:`xy`,color:AXES_THREE_COLOR.Z})),(config==null?void 0:config.xzPlaneEnable)!==!1&&(this.xzPlane=new PlaneHandle({direction:`xz`,color:AXES_THREE_COLOR.Y})),(config==null?void 0:config.yzPlaneEnable)!==!1&&(this.yzPlane=new PlaneHandle({direction:`yz`,color:AXES_THREE_COLOR.X})),config!=null&&config.container&&(config==null?void 0:config.moveTipsEnable)!==!1&&(this.container=config.container,this.moveTips=tipsDom({display:`none`}),this.container.appendChild(this.moveTips.element)),this.add(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle,this.xyPlane,this.xzPlane,this.yzPlane].filter(Boolean))}update(camera){if(this.xArrow&&(this.xArrow.visible=!0),this.yArrow&&(this.yArrow.visible=!0),this.zArrow&&(this.zArrow.visible=!0),this.centerHandle&&this.centerHandle.update(camera),camera.type===`OrthographicCamera`){let worldDirectionX=new THREE.Vector3(1,0,0).applyQuaternion(this.quaternion),worldDirectionY=new THREE.Vector3(0,1,0).applyQuaternion(this.quaternion),worldDirectionZ=new THREE.Vector3(0,0,1).applyQuaternion(this.quaternion),pose=camera.pose,orthographicCameraDirection=getOrthographicCameraDirection(pose),hideThreshold=.0872665;Math.abs(worldDirectionX.angleTo(orthographicCameraDirection)-0)<hideThreshold||Math.abs(worldDirectionX.angleTo(orthographicCameraDirection)-Math.PI)<hideThreshold?this.xArrow&&(this.xArrow.visible=!1):Math.abs(worldDirectionY.angleTo(orthographicCameraDirection)-0)<hideThreshold||Math.abs(worldDirectionY.angleTo(orthographicCameraDirection)-Math.PI)<hideThreshold?this.yArrow&&(this.yArrow.visible=!1):(Math.abs(worldDirectionZ.angleTo(orthographicCameraDirection)-0)<hideThreshold||Math.abs(worldDirectionZ.angleTo(orthographicCameraDirection)-Math.PI)<hideThreshold)&&this.zArrow&&(this.zArrow.visible=!1)}}show(){var _a;super.show(),this.xArrow&&this.add(this.xArrow),this.yArrow&&this.add(this.yArrow),this.zArrow&&this.add(this.zArrow),this.centerHandle&&this.add(this.centerHandle),this.xyPlane&&this.add(this.xyPlane),this.xzPlane&&this.add(this.xzPlane),this.yzPlane&&this.add(this.yzPlane),(_a=this.moveTips)==null||_a.hide()}setScaleByCamera(camera){this.scale.setScalar(calculateScaleByCamera(camera,this.position))}showDraggingHelper(directions){this.xArrow&&(directions.includes(`x`)?this.add(this.xArrow):this.remove(this.xArrow)),this.yArrow&&(directions.includes(`y`)?this.add(this.yArrow):this.remove(this.yArrow)),this.zArrow&&(directions.includes(`z`)?this.add(this.zArrow):this.remove(this.zArrow)),this.centerHandle&&(directions.includes(`plane`)?this.add(this.centerHandle):this.remove(this.centerHandle)),this.xyPlane&&(directions.includes(`xy`)?this.add(this.xyPlane):this.remove(this.xyPlane)),this.xzPlane&&(directions.includes(`xz`)?this.add(this.xzPlane):this.remove(this.xzPlane)),this.yzPlane&&(directions.includes(`yz`)?this.add(this.yzPlane):this.remove(this.yzPlane))}dispose(){var _a,_b;this.remove(...[this.xArrow,this.yArrow,this.zArrow,this.centerHandle,this.xyPlane,this.xzPlane,this.yzPlane].filter(Boolean)),(_b=(_a=this.moveTips)==null?void 0:_a.element)==null||_b.remove(),super.dispose()}};export{MoveHelper};
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 2026/10/30
5
- * Version: 1.0.0-alpha.13
4
+ * Generated: 2026/11/3
5
+ * Version: 1.0.0-alpha.14
6
6
  * License:
7
7
  * Realsee SDK License Agreement
8
8
 
@@ -335,4 +335,4 @@
335
335
  * writing and signed by Realsee. You and Realsee hereto confirm that this
336
336
  * Agreement and all related documents shall be drafted in English.
337
337
 
338
- */const e=require("../../../_virtual/_rolldown/runtime.js"),t=require("./BaseHelper.js"),n=require("../constant.js"),r=require("../utils/calculateScaleByCamera.js"),i=require("../utils/tipsDom.js");let a=require("three/webgpu");a=e.__toESM(a,1);var o=class extends t.RotateHelperAbstract{constructor(e,t){super(e,t),this.name=`RotateHelper`,this.children=[],(t==null?void 0:t.yzCircleEnable)!==!1&&(this.xCircle=new s({direction:`x`,color:n.AXES_THREE_COLOR.X})),(t==null?void 0:t.xzCircleEnable)!==!1&&(this.yCircle=new s({direction:`y`,color:n.AXES_THREE_COLOR.Y})),(t==null?void 0:t.xyCircleEnable)!==!1&&(this.zCircle=new s({direction:`z`,color:n.AXES_THREE_COLOR.Z})),t!=null&&t.container&&(t==null?void 0:t.angleTipsEnable)!==!1&&(this.container=t==null?void 0:t.container,this.angleTips=i.tipsDom({display:`none`}),this.container.appendChild(this.angleTips.element)),this.add(...[this.xCircle,this.yCircle,this.zCircle].filter(Boolean)),this.show()}hide(){this.children.forEach(e=>e.hide())}show(){var e;this.children.forEach(e=>e.showCircle()),(e=this.angleTips)==null||e.hide()}setScaleByCamera(e){this.scale.setScalar(r.default(e,this.position))}update(e){if(e.type===`OrthographicCamera`)return;let t=this.helperObject.position.clone().sub(e.position).normalize(),n=new a.Vector3(1,0,0).applyQuaternion(this.quaternion),r=new a.Vector3(0,1,0).applyQuaternion(this.quaternion),i=new a.Vector3(0,0,1).applyQuaternion(this.quaternion),o=t.angleTo(n),s=t.angleTo(r),c=t.angleTo(i),l=Math.PI/2,u=s>=l,d=c>=l,f=o>=l;if(this.xCircle){let e=this.xCircle.circle.gapAngle;u&&d?this.xCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,e,Math.PI/2-e*2):u&&!d?this.xCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,Math.PI/2+e,Math.PI/2-e*2):!u&&d?this.xCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,Math.PI/2*3+e,Math.PI/2-e*2):!u&&!d&&(this.xCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,Math.PI+e,Math.PI/2-e*2)),this.xCircle.angleSector&&(this.xCircle.angleSector.offsetAngle=e=>e,u&&d||u&&!d?this.xCircle.angleSector.baseAxes=new a.Vector3(0,0,1):!u&&d?(this.xCircle.angleSector.baseAxes=new a.Vector3(0,-1,0),this.xCircle.angleSector.offsetAngle=e=>e-Math.PI/2):!u&&!d&&(this.xCircle.angleSector.baseAxes=new a.Vector3(0,0,-1),this.xCircle.angleSector.offsetAngle=e=>e-Math.PI))}if(this.yCircle){this.yCircle.angleSector.offsetAngle=e=>e;let e=this.yCircle.circle.gapAngle;f&&d?this.yCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,e,Math.PI/2-e*2):f&&!d?this.yCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,Math.PI/2*3+e,Math.PI/2-e*2):!f&&d?this.yCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,Math.PI/2+e,Math.PI/2-e*2):!f&&!d&&(this.yCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,Math.PI+e,Math.PI/2-e*2)),f&&d?this.yCircle.angleSector.baseAxes=new a.Vector3(1,0,0):f&&!d?(this.yCircle.angleSector.baseAxes=new a.Vector3(0,0,-1),this.yCircle.angleSector.offsetAngle=e=>e-Math.PI/2):!f&&d?(this.yCircle.angleSector.baseAxes=new a.Vector3(0,0,1),this.yCircle.angleSector.offsetAngle=e=>e+Math.PI/2):!f&&!d&&(this.yCircle.angleSector.baseAxes=new a.Vector3(-1,0,0),this.yCircle.angleSector.offsetAngle=e=>e+Math.PI)}if(this.zCircle){this.zCircle.angleSector.offsetAngle=e=>e;let e=this.zCircle.circle.gapAngle;f&&u?this.zCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,e,Math.PI/2-e*2):f&&!u?this.zCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,Math.PI/2*3+e,Math.PI/2-e*2):!f&&u?this.zCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,Math.PI/2+e,Math.PI/2-e*2):!f&&!u&&(this.zCircle.circle.geometry=new a.RingGeometry(.3,.35,20,8,Math.PI+e,Math.PI/2-e*2)),this.zCircle.angleSector&&(f&&u?this.zCircle.angleSector.baseAxes=new a.Vector3(1,0,0):f&&!u?(this.zCircle.angleSector.baseAxes=new a.Vector3(0,-1,0),this.zCircle.angleSector.offsetAngle=e=>e-Math.PI/2):!f&&u?(this.zCircle.angleSector.baseAxes=new a.Vector3(0,1,0),this.zCircle.angleSector.offsetAngle=e=>e+Math.PI/2):!f&&!u&&(this.zCircle.angleSector.baseAxes=new a.Vector3(-1,0,0),this.zCircle.angleSector.offsetAngle=e=>e+Math.PI))}}showDraggingHelper(e){var t;this.hide(),this.children.filter(t=>e.includes(t.direction)).forEach(e=>e.showRing()),(t=this.angleTips)==null||t.show()}dispose(){var e,t;this.removeFromParent(),(t=(e=this.angleTips)==null?void 0:e.element)==null||t.remove()}},s=class extends a.Group{constructor(e){super(),this.direction=e.direction,this.circle=new c(e),this.ring=new l(e),this.angleSector=new u(e),this.add(this.circle,this.ring,this.angleSector),this.direction===`y`?this.rotation.x=Math.PI/2:this.direction===`x`&&(this.rotation.y=-Math.PI/2)}showCircle(){this.add(this.circle),this.remove(this.ring,this.angleSector)}showRing(){this.add(this.ring,this.angleSector),this.remove(this.circle)}hide(){this.remove(this.ring,this.angleSector,this.circle)}},c=class extends a.Mesh{constructor(e){var t;super(),this.gapAngle=.02,this.geometry=new a.RingGeometry(.3,.35,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2),this.material=new a.MeshBasicMaterial({opacity:.6,transparent:!0,color:(t=e.color)==null?16777215:t,side:a.DoubleSide,depthTest:!1}),this.direction=e.direction,this.renderOrder=n.RENDER_ORDER.ROTATE_HELPER,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`}},l=class extends a.Group{constructor(e){super(),this.direction=e.direction;let t=.015,n=Array(8).fill(null).map((e,n)=>{let r=new a.RingGeometry(.3,.35,20,8,Math.PI/4*n+t,Math.PI/4-t*2),i=new a.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,depthWrite:!1,transparent:!0,side:a.DoubleSide}),o=new a.Mesh(r,i);return o.name=`AxesDashedRing-${this.direction}-${n}`,o});this.add(...n)}},u=class extends a.Mesh{constructor(e){var t;switch(super(),this.offsetAngle=e=>e,e.direction){case`x`:this.baseAxes=new a.Vector3(0,0,1);break;case`y`:this.baseAxes=new a.Vector3(1,0,0);break;case`z`:this.baseAxes=new a.Vector3(1,0,0);break}this.geometry=new a.CircleGeometry(.3505,48,0,1e-4),this.material=new a.MeshBasicMaterial({opacity:.4,color:(t=e.color)==null?16777215:t,depthTest:!1,depthWrite:!1,transparent:!0,side:a.DoubleSide}),this.direction=e.direction,this.angleDirection=1}setClockwiseDirection(){this.angleDirection=-1}setCounterClockwiseDirection(){this.angleDirection=1}toggleDirection(){this.angleDirection=this.angleDirection===1?-1:1}setBaseAxes(e){this.baseAxes=e.clone().normalize()}getDirection(){return this.angleDirection===-1?`clockwise`:`counterclockwise`}};exports.RotateHelper=o;
338
+ */const require_runtime=require("../../../_virtual/_rolldown/runtime.js"),require_BaseHelper=require("./BaseHelper.js"),require_constant=require("../constant.js"),require_calculateScaleByCamera=require("../utils/calculateScaleByCamera.js"),require_tipsDom=require("../utils/tipsDom.js");let three_webgpu=require("three/webgpu");three_webgpu=require_runtime.__toESM(three_webgpu,1);var RotateHelper=class extends require_BaseHelper.RotateHelperAbstract{constructor(originObject3D,config){super(originObject3D,config),this.name=`RotateHelper`,this.children=[],(config==null?void 0:config.yzCircleEnable)!==!1&&(this.xCircle=new RotateCircleGroup({direction:`x`,color:require_constant.AXES_THREE_COLOR.X})),(config==null?void 0:config.xzCircleEnable)!==!1&&(this.yCircle=new RotateCircleGroup({direction:`y`,color:require_constant.AXES_THREE_COLOR.Y})),(config==null?void 0:config.xyCircleEnable)!==!1&&(this.zCircle=new RotateCircleGroup({direction:`z`,color:require_constant.AXES_THREE_COLOR.Z})),config!=null&&config.container&&(config==null?void 0:config.angleTipsEnable)!==!1&&(this.container=config==null?void 0:config.container,this.angleTips=require_tipsDom.tipsDom({display:`none`}),this.container.appendChild(this.angleTips.element)),this.add(...[this.xCircle,this.yCircle,this.zCircle].filter(Boolean)),this.show()}hide(){this.children.forEach(child=>child.hide())}show(){var _a;this.children.forEach(child=>child.showCircle()),(_a=this.angleTips)==null||_a.hide()}setScaleByCamera(camera){this.scale.setScalar(require_calculateScaleByCamera.default(camera,this.position))}update(camera){if(camera.type===`OrthographicCamera`)return;let cameraDirection=this.helperObject.position.clone().sub(camera.position).normalize(),worldDirectionX=new three_webgpu.Vector3(1,0,0).applyQuaternion(this.quaternion),worldDirectionY=new three_webgpu.Vector3(0,1,0).applyQuaternion(this.quaternion),worldDirectionZ=new three_webgpu.Vector3(0,0,1).applyQuaternion(this.quaternion),angleX=cameraDirection.angleTo(worldDirectionX),angleY=cameraDirection.angleTo(worldDirectionY),angleZ=cameraDirection.angleTo(worldDirectionZ),threshold=Math.PI/2,positiveY=angleY>=threshold,positiveZ=angleZ>=threshold,positiveX=angleX>=threshold;if(this.xCircle){let gapAngle=this.xCircle.circle.gapAngle;positiveY&&positiveZ?this.xCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,gapAngle,Math.PI/2-gapAngle*2):positiveY&&!positiveZ?this.xCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,Math.PI/2+gapAngle,Math.PI/2-gapAngle*2):!positiveY&&positiveZ?this.xCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,Math.PI/2*3+gapAngle,Math.PI/2-gapAngle*2):!positiveY&&!positiveZ&&(this.xCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,Math.PI+gapAngle,Math.PI/2-gapAngle*2)),this.xCircle.angleSector&&(this.xCircle.angleSector.offsetAngle=angle=>angle,positiveY&&positiveZ||positiveY&&!positiveZ?this.xCircle.angleSector.baseAxes=new three_webgpu.Vector3(0,0,1):!positiveY&&positiveZ?(this.xCircle.angleSector.baseAxes=new three_webgpu.Vector3(0,-1,0),this.xCircle.angleSector.offsetAngle=angle=>angle-Math.PI/2):!positiveY&&!positiveZ&&(this.xCircle.angleSector.baseAxes=new three_webgpu.Vector3(0,0,-1),this.xCircle.angleSector.offsetAngle=angle=>angle-Math.PI))}if(this.yCircle){this.yCircle.angleSector.offsetAngle=angle=>angle;let gapAngle=this.yCircle.circle.gapAngle;positiveX&&positiveZ?this.yCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,gapAngle,Math.PI/2-gapAngle*2):positiveX&&!positiveZ?this.yCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,Math.PI/2*3+gapAngle,Math.PI/2-gapAngle*2):!positiveX&&positiveZ?this.yCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,Math.PI/2+gapAngle,Math.PI/2-gapAngle*2):!positiveX&&!positiveZ&&(this.yCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,Math.PI+gapAngle,Math.PI/2-gapAngle*2)),positiveX&&positiveZ?this.yCircle.angleSector.baseAxes=new three_webgpu.Vector3(1,0,0):positiveX&&!positiveZ?(this.yCircle.angleSector.baseAxes=new three_webgpu.Vector3(0,0,-1),this.yCircle.angleSector.offsetAngle=angle=>angle-Math.PI/2):!positiveX&&positiveZ?(this.yCircle.angleSector.baseAxes=new three_webgpu.Vector3(0,0,1),this.yCircle.angleSector.offsetAngle=angle=>angle+Math.PI/2):!positiveX&&!positiveZ&&(this.yCircle.angleSector.baseAxes=new three_webgpu.Vector3(-1,0,0),this.yCircle.angleSector.offsetAngle=angle=>angle+Math.PI)}if(this.zCircle){this.zCircle.angleSector.offsetAngle=angle=>angle;let gapAngle=this.zCircle.circle.gapAngle;positiveX&&positiveY?this.zCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,gapAngle,Math.PI/2-gapAngle*2):positiveX&&!positiveY?this.zCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,Math.PI/2*3+gapAngle,Math.PI/2-gapAngle*2):!positiveX&&positiveY?this.zCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,Math.PI/2+gapAngle,Math.PI/2-gapAngle*2):!positiveX&&!positiveY&&(this.zCircle.circle.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,Math.PI+gapAngle,Math.PI/2-gapAngle*2)),this.zCircle.angleSector&&(positiveX&&positiveY?this.zCircle.angleSector.baseAxes=new three_webgpu.Vector3(1,0,0):positiveX&&!positiveY?(this.zCircle.angleSector.baseAxes=new three_webgpu.Vector3(0,-1,0),this.zCircle.angleSector.offsetAngle=angle=>angle-Math.PI/2):!positiveX&&positiveY?(this.zCircle.angleSector.baseAxes=new three_webgpu.Vector3(0,1,0),this.zCircle.angleSector.offsetAngle=angle=>angle+Math.PI/2):!positiveX&&!positiveY&&(this.zCircle.angleSector.baseAxes=new three_webgpu.Vector3(-1,0,0),this.zCircle.angleSector.offsetAngle=angle=>angle+Math.PI))}}showDraggingHelper(directions){var _a;this.hide(),this.children.filter(child=>directions.includes(child.direction)).forEach(child=>child.showRing()),(_a=this.angleTips)==null||_a.show()}dispose(){var _a,_b;this.removeFromParent(),(_b=(_a=this.angleTips)==null?void 0:_a.element)==null||_b.remove()}},RotateCircleGroup=class extends three_webgpu.Group{constructor(options){super(),this.direction=options.direction,this.circle=new Circle(options),this.ring=new DashedRing(options),this.angleSector=new AngleSector(options),this.add(this.circle,this.ring,this.angleSector),this.direction===`y`?this.rotation.x=Math.PI/2:this.direction===`x`&&(this.rotation.y=-Math.PI/2)}showCircle(){this.add(this.circle),this.remove(this.ring,this.angleSector)}showRing(){this.add(this.ring,this.angleSector),this.remove(this.circle)}hide(){this.remove(this.ring,this.angleSector,this.circle)}},Circle=class extends three_webgpu.Mesh{constructor(options){var _a;super(),this.gapAngle=.02,this.geometry=new three_webgpu.RingGeometry(.3,.35,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2),this.material=new three_webgpu.MeshBasicMaterial({opacity:.6,transparent:!0,color:(_a=options.color)==null?16777215:_a,side:three_webgpu.DoubleSide,depthTest:!1}),this.direction=options.direction,this.renderOrder=require_constant.RENDER_ORDER.ROTATE_HELPER,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`}},DashedRing=class extends three_webgpu.Group{constructor(options){super(),this.direction=options.direction;let gapAngle=.015,meshes=Array(8).fill(null).map((_,i)=>{let geometry=new three_webgpu.RingGeometry(.3,.35,20,8,Math.PI/4*i+gapAngle,Math.PI/4-gapAngle*2),material=new three_webgpu.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,depthWrite:!1,transparent:!0,side:three_webgpu.DoubleSide}),mesh=new three_webgpu.Mesh(geometry,material);return mesh.name=`AxesDashedRing-${this.direction}-${i}`,mesh});this.add(...meshes)}},AngleSector=class extends three_webgpu.Mesh{constructor(options){var _a;switch(super(),this.offsetAngle=angle=>angle,options.direction){case`x`:this.baseAxes=new three_webgpu.Vector3(0,0,1);break;case`y`:this.baseAxes=new three_webgpu.Vector3(1,0,0);break;case`z`:this.baseAxes=new three_webgpu.Vector3(1,0,0);break}this.geometry=new three_webgpu.CircleGeometry(.3505,48,0,1e-4),this.material=new three_webgpu.MeshBasicMaterial({opacity:.4,color:(_a=options.color)==null?16777215:_a,depthTest:!1,depthWrite:!1,transparent:!0,side:three_webgpu.DoubleSide}),this.direction=options.direction,this.angleDirection=1}setClockwiseDirection(){this.angleDirection=-1}setCounterClockwiseDirection(){this.angleDirection=1}toggleDirection(){this.angleDirection=this.angleDirection===1?-1:1}setBaseAxes(axes){this.baseAxes=axes.clone().normalize()}getDirection(){return this.angleDirection===-1?`clockwise`:`counterclockwise`}};exports.RotateHelper=RotateHelper;