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

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 (181) hide show
  1. package/_virtual/_rolldown/runtime.js +2 -2
  2. package/five/index.js +50 -50
  3. package/five/index.mjs +1149 -1186
  4. package/five/renderer/postprocessing/passes/pass.js +2 -2
  5. package/five/renderer/postprocessing/passes/pass.mjs +2 -2
  6. package/five/renderer/tools/full-screen-quad.js +2 -2
  7. package/five/renderer/tools/full-screen-quad.mjs +2 -2
  8. package/five/utils/calculateThreeMouse.js +2 -2
  9. package/five/utils/calculateThreeMouse.mjs +2 -2
  10. package/five/utils/distance.js +2 -2
  11. package/five/utils/distance.mjs +2 -2
  12. package/five/utils/isNil.js +2 -2
  13. package/five/utils/isNil.mjs +2 -2
  14. package/five/utils/uuid.js +2 -2
  15. package/five/utils/uuid.mjs +2 -2
  16. package/gltf-loader/index.js +3 -3
  17. package/gltf-loader/index.mjs +3 -3
  18. package/line/index.js +3 -3
  19. package/line/index.mjs +3 -3
  20. package/package.json +1 -1
  21. package/plugins/BackgroundPlugin/Controller.js +3 -3
  22. package/plugins/BackgroundPlugin/Controller.mjs +3 -3
  23. package/plugins/BackgroundPlugin/index.js +2 -2
  24. package/plugins/BackgroundPlugin/index.mjs +2 -2
  25. package/plugins/BasePlugin/index.js +2 -2
  26. package/plugins/BasePlugin/index.mjs +2 -2
  27. package/plugins/CSS2DPlugin/Controller.js +3 -3
  28. package/plugins/CSS2DPlugin/Controller.mjs +3 -3
  29. package/plugins/CSS2DPlugin/index.js +2 -2
  30. package/plugins/CSS2DPlugin/index.mjs +2 -2
  31. package/plugins/CSS2DPlugin/style.css_raw.js +2 -2
  32. package/plugins/CSS2DPlugin/style.css_raw.mjs +2 -2
  33. package/plugins/CSS3DPlugin/Controller.js +3 -3
  34. package/plugins/CSS3DPlugin/Controller.mjs +3 -3
  35. package/plugins/CSS3DPlugin/index.js +2 -2
  36. package/plugins/CSS3DPlugin/index.mjs +2 -2
  37. package/plugins/CSS3DPlugin/style.css_raw.js +2 -2
  38. package/plugins/CSS3DPlugin/style.css_raw.mjs +2 -2
  39. package/plugins/FloorplanPlugin/Controller.js +3 -3
  40. package/plugins/FloorplanPlugin/Controller.mjs +3 -3
  41. package/plugins/FloorplanPlugin/index.js +2 -2
  42. package/plugins/FloorplanPlugin/index.mjs +2 -2
  43. package/plugins/FloorplanPlugin/render/assets.js +2 -2
  44. package/plugins/FloorplanPlugin/render/assets.mjs +2 -2
  45. package/plugins/FloorplanPlugin/render/index.js +2 -2
  46. package/plugins/FloorplanPlugin/render/index.mjs +2 -2
  47. package/plugins/FloorplanPlugin/render/isPointInPolygon.js +2 -2
  48. package/plugins/FloorplanPlugin/render/isPointInPolygon.mjs +2 -2
  49. package/plugins/FloorplanPlugin/render/renderFloor.js +2 -2
  50. package/plugins/FloorplanPlugin/render/renderFloor.mjs +2 -2
  51. package/plugins/FloorplanPlugin/render/roomLabelVisibility.js +2 -2
  52. package/plugins/FloorplanPlugin/render/roomLabelVisibility.mjs +2 -2
  53. package/plugins/FloorplanPlugin/render/style.css_raw.js +2 -2
  54. package/plugins/FloorplanPlugin/render/style.css_raw.mjs +2 -2
  55. package/plugins/FloorplanPlugin/utils/changeMode.js +3 -3
  56. package/plugins/FloorplanPlugin/utils/changeMode.mjs +3 -3
  57. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.js +2 -2
  58. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.mjs +2 -2
  59. package/plugins/FloorplanPlugin/utils/correctFiveState.js +3 -3
  60. package/plugins/FloorplanPlugin/utils/correctFiveState.mjs +3 -3
  61. package/plugins/FloorplanPlugin/utils/equal.js +2 -2
  62. package/plugins/FloorplanPlugin/utils/equal.mjs +2 -2
  63. package/plugins/FloorplanPlugin/utils/filter.js +2 -2
  64. package/plugins/FloorplanPlugin/utils/filter.mjs +2 -2
  65. package/plugins/FloorplanPlugin/utils/fiveModelLoad.js +3 -3
  66. package/plugins/FloorplanPlugin/utils/fiveModelLoad.mjs +3 -3
  67. package/plugins/FloorplanPlugin/utils/formatData.js +3 -3
  68. package/plugins/FloorplanPlugin/utils/formatData.mjs +3 -3
  69. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.js +2 -2
  70. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.mjs +2 -2
  71. package/plugins/FloorplanPlugin/utils/formatPosition.js +2 -2
  72. package/plugins/FloorplanPlugin/utils/formatPosition.mjs +2 -2
  73. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.js +2 -2
  74. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.mjs +2 -2
  75. package/plugins/FloorplanPlugin/utils/getPxmm.js +2 -2
  76. package/plugins/FloorplanPlugin/utils/getPxmm.mjs +2 -2
  77. package/plugins/FloorplanPlugin/utils/isTruelyObject.js +2 -2
  78. package/plugins/FloorplanPlugin/utils/isTruelyObject.mjs +2 -2
  79. package/plugins/FloorplanPlugin/utils/nearlyEqual.js +2 -2
  80. package/plugins/FloorplanPlugin/utils/nearlyEqual.mjs +2 -2
  81. package/plugins/FloorplanPlugin/utils/polylabel.js +2 -2
  82. package/plugins/FloorplanPlugin/utils/polylabel.mjs +2 -2
  83. package/plugins/FloorplanPlugin/utils/to.js +3 -3
  84. package/plugins/FloorplanPlugin/utils/to.mjs +3 -3
  85. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.js +3 -3
  86. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.mjs +3 -3
  87. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.js +2 -2
  88. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.mjs +2 -2
  89. package/plugins/Object3DHelperPlugin/Controller.js +3 -3
  90. package/plugins/Object3DHelperPlugin/Controller.mjs +3 -3
  91. package/plugins/Object3DHelperPlugin/Controllers/BaseController.js +2 -2
  92. package/plugins/Object3DHelperPlugin/Controllers/BaseController.mjs +2 -2
  93. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.js +2 -2
  94. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.mjs +2 -2
  95. package/plugins/Object3DHelperPlugin/Controllers/MoveController.js +2 -2
  96. package/plugins/Object3DHelperPlugin/Controllers/MoveController.mjs +2 -2
  97. package/plugins/Object3DHelperPlugin/Controllers/RotateController.js +2 -2
  98. package/plugins/Object3DHelperPlugin/Controllers/RotateController.mjs +2 -2
  99. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.js +2 -2
  100. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.mjs +2 -2
  101. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.js +2 -2
  102. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.mjs +2 -2
  103. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.js +2 -2
  104. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.mjs +2 -2
  105. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.js +2 -2
  106. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.mjs +2 -2
  107. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.js +2 -2
  108. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.mjs +2 -2
  109. package/plugins/Object3DHelperPlugin/constant.js +2 -2
  110. package/plugins/Object3DHelperPlugin/constant.mjs +2 -2
  111. package/plugins/Object3DHelperPlugin/index.js +2 -2
  112. package/plugins/Object3DHelperPlugin/index.mjs +2 -2
  113. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.js +2 -2
  114. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.mjs +2 -2
  115. package/plugins/Object3DHelperPlugin/utils/CenterHandle.js +2 -2
  116. package/plugins/Object3DHelperPlugin/utils/CenterHandle.mjs +2 -2
  117. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.js +2 -2
  118. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.mjs +2 -2
  119. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.js +2 -2
  120. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.mjs +2 -2
  121. package/plugins/Object3DHelperPlugin/utils/cameraHooks.js +2 -2
  122. package/plugins/Object3DHelperPlugin/utils/cameraHooks.mjs +2 -2
  123. package/plugins/Object3DHelperPlugin/utils/direction.js +2 -2
  124. package/plugins/Object3DHelperPlugin/utils/direction.mjs +2 -2
  125. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.js +2 -2
  126. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.mjs +2 -2
  127. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.js +2 -2
  128. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.mjs +2 -2
  129. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.js +2 -2
  130. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.mjs +2 -2
  131. package/plugins/Object3DHelperPlugin/utils/solidGuide.js +2 -2
  132. package/plugins/Object3DHelperPlugin/utils/solidGuide.mjs +2 -2
  133. package/plugins/Object3DHelperPlugin/utils/tipsDom.js +2 -2
  134. package/plugins/Object3DHelperPlugin/utils/tipsDom.mjs +2 -2
  135. package/plugins/PanoAnimePlugin/Controller.js +3 -3
  136. package/plugins/PanoAnimePlugin/Controller.mjs +3 -3
  137. package/plugins/PanoAnimePlugin/index.js +2 -2
  138. package/plugins/PanoAnimePlugin/index.mjs +2 -2
  139. package/plugins/WordPassPlugin/Controller.js +3 -3
  140. package/plugins/WordPassPlugin/Controller.mjs +3 -3
  141. package/plugins/WordPassPlugin/hersheyFont.js +2 -2
  142. package/plugins/WordPassPlugin/hersheyFont.mjs +2 -2
  143. package/plugins/WordPassPlugin/index.js +2 -2
  144. package/plugins/WordPassPlugin/index.mjs +2 -2
  145. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.js +3 -3
  146. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.mjs +4 -4
  147. package/plugins/WordPassPlugin/word-pass.js +3 -3
  148. package/plugins/WordPassPlugin/word-pass.mjs +3 -3
  149. package/plugins/index.js +2 -2
  150. package/plugins/index.mjs +2 -2
  151. package/plugins/thirdParty/CSS2DRenderer.js +2 -2
  152. package/plugins/thirdParty/CSS2DRenderer.mjs +2 -2
  153. package/plugins/thirdParty/CSS3DRenderer.js +2 -2
  154. package/plugins/thirdParty/CSS3DRenderer.mjs +2 -2
  155. package/plugins/thirdParty/doctorstrange-model.js +2 -2
  156. package/plugins/thirdParty/doctorstrange-model.mjs +2 -2
  157. package/plugins/thirdParty/domevents.js +2 -2
  158. package/plugins/thirdParty/domevents.mjs +2 -2
  159. package/plugins/utils/absoluteUrl.js +2 -2
  160. package/plugins/utils/absoluteUrl.mjs +2 -2
  161. package/plugins/utils/calculatePath.js +2 -2
  162. package/plugins/utils/calculatePath.mjs +2 -2
  163. package/plugins/utils/clamp.js +2 -2
  164. package/plugins/utils/clamp.mjs +2 -2
  165. package/plugins/utils/uuid.js +2 -2
  166. package/plugins/utils/uuid.mjs +2 -2
  167. package/react/index.js +2 -2
  168. package/react/index.mjs +2 -2
  169. package/sticker/index.js +3 -3
  170. package/sticker/index.mjs +3 -3
  171. package/umd/five-gltf-loader.js +3 -3
  172. package/umd/five-line.js +3 -3
  173. package/umd/five-plugins.js +2 -2
  174. package/umd/five-react.js +2 -2
  175. package/umd/five-sticker.js +3 -3
  176. package/umd/five-vfx.js +2 -2
  177. package/umd/five.js +3 -3
  178. package/vfx/index.js +2 -2
  179. package/vfx/index.mjs +2 -2
  180. package/work-downloader/index.js +3 -3
  181. package/work-downloader/index.mjs +152 -180
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,4 +252,4 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */const e=require("../../_virtual/_rolldown/runtime.js"),t=require("../../node_modules/tslib/tslib.es6.js"),n=require("../BasePlugin/index.js"),r=require("../utils/clamp.js");let i=require("@realsee/five-webgpu"),a=require("three/webgpu");a=e.__toESM(a,1);let o=require("three/tsl");function s(){let e={map:(0,o.texture)(new a.Texture),progress:(0,o.uniform)(0),opacity:(0,o.uniform)(0)},t=(0,o.Fn)(()=>{let t=(0,o.uv)(),n=(0,o.varying)(o.positionGeometry);(0,o.Discard)(t.y.greaterThan(e.progress));let r=e.map.sample(t),i=(0,o.vec4)((0,o.vec3)(1,1,1),e.progress.sub(n.y).mul(.7)),a=i.add((0,o.vec4)(r.rgb,r.a.mul(n.y.oneMinus()))),s=(0,o.select)(e.progress.equal(1),a,i);return(0,o.vec4)(s.rgb,s.a.mul(e.opacity))}),n=new a.NodeMaterial;return n.fragmentNode=t(),n.transparent=!0,n.depthTest=!1,{material:n,u:e}}var c=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],l=512,u=512,d=128,f=class extends n.BasePlugin.Controller{get config(){return Object.assign({},this._config)}updateState(e,t){let n=this.state;this.state=Object.assign(Object.assign({},this.state),e),this.hooks.emit(`stateChange`,{state:this.state,prevState:n,userAction:t})}updateConfig(e,t={}){var n;let r=this.config,i=Object.assign(Object.assign({},r),e);this._config=i,this.hooks.emit(`configChange`,{prevConfig:r,config:i,userAction:(n=t.userAction)==null?!0:n})}constructor(e,t){super(e),this.group=new a.Group,this.materialUniforms=s(),this.mesh=(()=>{let e=new a.CylinderGeometry(.12,.12,1,32,1,!0);return e.translate(0,.5,0),new a.Mesh(e,this.materialUniforms.material)})(),this.panoMesh=new i.PanoCircleMesh({scale:1.5}),this.stop=()=>{},this.drawLine=(e,t)=>{if(!this.ctx)return;let n=(()=>{var t;return 32*((t=c[e])==null?0:t)})(),r=(1-(t+e*150)%1200/1200)*640,i=this.ctx.createLinearGradient(0,r-d,0,r);i.addColorStop(0,`rgba(255,255,255,0)`),i.addColorStop(.5,`rgba(255,255,255,1)`),i.addColorStop(1,`rgba(255,255,255,0)`),this.ctx.fillStyle=i,this.ctx.fillRect(n,r-d,3,d)},this.anime=e=>{if(!this.ctx||!this.startTime)return;this.ctx.clearRect(0,0,l,u);for(let t=0;t<16;t++)this.drawLine(t,e-this.startTime);let t=r.clamp((e-this.startTime)/1e3,0,1),n=r.clamp((e-this.startTime)/300,0,this.config.maxOpacity);this.panoMesh.setOpacity(n),this.materialUniforms.u.progress.value=t,this.materialUniforms.u.opacity.value=n,this.canvasTexture&&(this.canvasTexture.needsUpdate=!0),this.five.needsRender=!0},this.dispose=()=>{this.disable()},this.five=e;let n={enabled:!1,visible:!0};this.state=Object.assign(n,t==null?void 0:t.initialState);let o=Object.assign(Object.assign({},t==null?void 0:t.config),{maxOpacity:1});this._config=o,!(typeof document>`u`)&&(this.canvas=document.createElement(`canvas`),this.ctx=this.canvas.getContext(`2d`),this.canvas.width=l,this.canvas.height=u,this.ctx.shadowColor=`rgba(255,255,255,0.5)`,this.ctx.shadowBlur=6,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.canvasTexture=new a.CanvasTexture(this.canvas),this.materialUniforms.u.map.value=this.canvasTexture,this.group.add(this.mesh),this.panoMesh.setProgress(1),this.panoMesh.setOpacity(0),this.group.add(this.panoMesh),this.state.enabled&&this._enable({userAction:!1}))}load(e){return t.__awaiter(this,void 0,void 0,function*(){})}_enable(e){this.mesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.panoMesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.five.ready().then(()=>{this.five.scene.add(this.group),this.stop=i.AnimationFrameLoop.shared.add((e,t)=>{this.startTime||(this.startTime=e),this.panoMesh.updateTime(e,t),this.anime(e)})})}_disable(e){this.five.scene.remove(this.group),this.panoMesh.setOpacity(0),this.startTime=void 0,this.stop(),this.five.needsRender=!0}enable(e){var t;if(!this.ctx||this.state.enabled||!this.five.observers[this.five.state.panoIndex])return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!0},n),this._enable({userAction:n})}disable(e){var t;if(this.state.enabled===!1)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!1},n),this._disable({userAction:n})}setState(e,t={}){let n=this.state,r=t.userAction===void 0?!0:t.userAction;if(this.updateState(e,r),e.enabled!==void 0&&n.enabled!==e.enabled){let t={userAction:r};e.enabled?this._enable(t):this._disable(t)}}};exports.Controller=f;
255
+ */const e=require("../../_virtual/_rolldown/runtime.js"),t=require("../BasePlugin/index.js"),n=require("../utils/clamp.js");let r=require("tslib"),i=require("@realsee/five-webgpu"),a=require("three/webgpu");a=e.__toESM(a,1);let o=require("three/tsl");function s(){let e={map:(0,o.texture)(new a.Texture),progress:(0,o.uniform)(0),opacity:(0,o.uniform)(0)},t=(0,o.Fn)(()=>{let t=(0,o.uv)(),n=(0,o.varying)(o.positionGeometry);(0,o.Discard)(t.y.greaterThan(e.progress));let r=e.map.sample(t),i=(0,o.vec4)((0,o.vec3)(1,1,1),e.progress.sub(n.y).mul(.7)),a=i.add((0,o.vec4)(r.rgb,r.a.mul(n.y.oneMinus()))),s=(0,o.select)(e.progress.equal(1),a,i);return(0,o.vec4)(s.rgb,s.a.mul(e.opacity))}),n=new a.NodeMaterial;return n.fragmentNode=t(),n.transparent=!0,n.depthTest=!1,{material:n,u:e}}var c=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],l=512,u=512,d=128,f=class extends t.BasePlugin.Controller{get config(){return Object.assign({},this._config)}updateState(e,t){let n=this.state;this.state=Object.assign(Object.assign({},this.state),e),this.hooks.emit(`stateChange`,{state:this.state,prevState:n,userAction:t})}updateConfig(e,t={}){var n;let r=this.config,i=Object.assign(Object.assign({},r),e);this._config=i,this.hooks.emit(`configChange`,{prevConfig:r,config:i,userAction:(n=t.userAction)==null?!0:n})}constructor(e,t){super(e),this.group=new a.Group,this.materialUniforms=s(),this.mesh=(()=>{let e=new a.CylinderGeometry(.12,.12,1,32,1,!0);return e.translate(0,.5,0),new a.Mesh(e,this.materialUniforms.material)})(),this.panoMesh=new i.PanoCircleMesh({scale:1.5}),this.stop=()=>{},this.drawLine=(e,t)=>{if(!this.ctx)return;let n=(()=>{var t;return 32*((t=c[e])==null?0:t)})(),r=(1-(t+e*150)%1200/1200)*640,i=this.ctx.createLinearGradient(0,r-d,0,r);i.addColorStop(0,`rgba(255,255,255,0)`),i.addColorStop(.5,`rgba(255,255,255,1)`),i.addColorStop(1,`rgba(255,255,255,0)`),this.ctx.fillStyle=i,this.ctx.fillRect(n,r-d,3,d)},this.anime=e=>{if(!this.ctx||!this.startTime)return;this.ctx.clearRect(0,0,l,u);for(let t=0;t<16;t++)this.drawLine(t,e-this.startTime);let t=n.clamp((e-this.startTime)/1e3,0,1),r=n.clamp((e-this.startTime)/300,0,this.config.maxOpacity);this.panoMesh.setOpacity(r),this.materialUniforms.u.progress.value=t,this.materialUniforms.u.opacity.value=r,this.canvasTexture&&(this.canvasTexture.needsUpdate=!0),this.five.needsRender=!0},this.dispose=()=>{this.disable()},this.five=e;let r={enabled:!1,visible:!0};this.state=Object.assign(r,t==null?void 0:t.initialState);let o=Object.assign(Object.assign({},t==null?void 0:t.config),{maxOpacity:1});this._config=o,!(typeof document>`u`)&&(this.canvas=document.createElement(`canvas`),this.ctx=this.canvas.getContext(`2d`),this.canvas.width=l,this.canvas.height=u,this.ctx.shadowColor=`rgba(255,255,255,0.5)`,this.ctx.shadowBlur=6,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.canvasTexture=new a.CanvasTexture(this.canvas),this.materialUniforms.u.map.value=this.canvasTexture,this.group.add(this.mesh),this.panoMesh.setProgress(1),this.panoMesh.setOpacity(0),this.group.add(this.panoMesh),this.state.enabled&&this._enable({userAction:!1}))}load(e){return(0,r.__awaiter)(this,void 0,void 0,function*(){})}_enable(e){this.mesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.panoMesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.five.ready().then(()=>{this.five.scene.add(this.group),this.stop=i.AnimationFrameLoop.shared.add((e,t)=>{this.startTime||(this.startTime=e),this.panoMesh.updateTime(e,t),this.anime(e)})})}_disable(e){this.five.scene.remove(this.group),this.panoMesh.setOpacity(0),this.startTime=void 0,this.stop(),this.five.needsRender=!0}enable(e){var t;if(!this.ctx||this.state.enabled||!this.five.observers[this.five.state.panoIndex])return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!0},n),this._enable({userAction:n})}disable(e){var t;if(this.state.enabled===!1)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!1},n),this._disable({userAction:n})}setState(e,t={}){let n=this.state,r=t.userAction===void 0?!0:t.userAction;if(this.updateState(e,r),e.enabled!==void 0&&n.enabled!==e.enabled){let t={userAction:r};e.enabled?this._enable(t):this._disable(t)}}};exports.Controller=f;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,4 +252,4 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */import{__awaiter as e}from"../../node_modules/tslib/tslib.es6.mjs";import{BasePlugin as t}from"../BasePlugin/index.mjs";import{clamp as n}from"../utils/clamp.mjs";import{AnimationFrameLoop as r,PanoCircleMesh as i}from"@realsee/five-webgpu";import*as a from"three/webgpu";import{Discard as o,Fn as s,positionGeometry as c,select as l,texture as u,uniform as d,uv as f,varying as p,vec3 as m,vec4 as h}from"three/tsl";function g(){let e={map:u(new a.Texture),progress:d(0),opacity:d(0)},t=s(()=>{let t=f(),n=p(c);o(t.y.greaterThan(e.progress));let r=e.map.sample(t),i=h(m(1,1,1),e.progress.sub(n.y).mul(.7)),a=i.add(h(r.rgb,r.a.mul(n.y.oneMinus()))),s=l(e.progress.equal(1),a,i);return h(s.rgb,s.a.mul(e.opacity))}),n=new a.NodeMaterial;return n.fragmentNode=t(),n.transparent=!0,n.depthTest=!1,{material:n,u:e}}var _=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],v=512,y=512,b=128,x=class extends t.Controller{get config(){return Object.assign({},this._config)}updateState(e,t){let n=this.state;this.state=Object.assign(Object.assign({},this.state),e),this.hooks.emit(`stateChange`,{state:this.state,prevState:n,userAction:t})}updateConfig(e,t={}){var n;let r=this.config,i=Object.assign(Object.assign({},r),e);this._config=i,this.hooks.emit(`configChange`,{prevConfig:r,config:i,userAction:(n=t.userAction)==null?!0:n})}constructor(e,t){super(e),this.group=new a.Group,this.materialUniforms=g(),this.mesh=(()=>{let e=new a.CylinderGeometry(.12,.12,1,32,1,!0);return e.translate(0,.5,0),new a.Mesh(e,this.materialUniforms.material)})(),this.panoMesh=new i({scale:1.5}),this.stop=()=>{},this.drawLine=(e,t)=>{if(!this.ctx)return;let n=(()=>{var t;return 32*((t=_[e])==null?0:t)})(),r=(1-(t+e*150)%1200/1200)*640,i=this.ctx.createLinearGradient(0,r-b,0,r);i.addColorStop(0,`rgba(255,255,255,0)`),i.addColorStop(.5,`rgba(255,255,255,1)`),i.addColorStop(1,`rgba(255,255,255,0)`),this.ctx.fillStyle=i,this.ctx.fillRect(n,r-b,3,b)},this.anime=e=>{if(!this.ctx||!this.startTime)return;this.ctx.clearRect(0,0,v,y);for(let t=0;t<16;t++)this.drawLine(t,e-this.startTime);let t=n((e-this.startTime)/1e3,0,1),r=n((e-this.startTime)/300,0,this.config.maxOpacity);this.panoMesh.setOpacity(r),this.materialUniforms.u.progress.value=t,this.materialUniforms.u.opacity.value=r,this.canvasTexture&&(this.canvasTexture.needsUpdate=!0),this.five.needsRender=!0},this.dispose=()=>{this.disable()},this.five=e;let r={enabled:!1,visible:!0};this.state=Object.assign(r,t==null?void 0:t.initialState);let o=Object.assign(Object.assign({},t==null?void 0:t.config),{maxOpacity:1});this._config=o,!(typeof document>`u`)&&(this.canvas=document.createElement(`canvas`),this.ctx=this.canvas.getContext(`2d`),this.canvas.width=v,this.canvas.height=y,this.ctx.shadowColor=`rgba(255,255,255,0.5)`,this.ctx.shadowBlur=6,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.canvasTexture=new a.CanvasTexture(this.canvas),this.materialUniforms.u.map.value=this.canvasTexture,this.group.add(this.mesh),this.panoMesh.setProgress(1),this.panoMesh.setOpacity(0),this.group.add(this.panoMesh),this.state.enabled&&this._enable({userAction:!1}))}load(t){return e(this,void 0,void 0,function*(){})}_enable(e){this.mesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.panoMesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.five.ready().then(()=>{this.five.scene.add(this.group),this.stop=r.shared.add((e,t)=>{this.startTime||(this.startTime=e),this.panoMesh.updateTime(e,t),this.anime(e)})})}_disable(e){this.five.scene.remove(this.group),this.panoMesh.setOpacity(0),this.startTime=void 0,this.stop(),this.five.needsRender=!0}enable(e){var t;if(!this.ctx||this.state.enabled||!this.five.observers[this.five.state.panoIndex])return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!0},n),this._enable({userAction:n})}disable(e){var t;if(this.state.enabled===!1)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!1},n),this._disable({userAction:n})}setState(e,t={}){let n=this.state,r=t.userAction===void 0?!0:t.userAction;if(this.updateState(e,r),e.enabled!==void 0&&n.enabled!==e.enabled){let t={userAction:r};e.enabled?this._enable(t):this._disable(t)}}};export{x as Controller};
255
+ */import{BasePlugin as e}from"../BasePlugin/index.mjs";import{clamp as t}from"../utils/clamp.mjs";import{__awaiter as n}from"tslib";import{AnimationFrameLoop as r,PanoCircleMesh as i}from"@realsee/five-webgpu";import*as a from"three/webgpu";import{Discard as o,Fn as s,positionGeometry as c,select as l,texture as u,uniform as d,uv as f,varying as p,vec3 as m,vec4 as h}from"three/tsl";function g(){let e={map:u(new a.Texture),progress:d(0),opacity:d(0)},t=s(()=>{let t=f(),n=p(c);o(t.y.greaterThan(e.progress));let r=e.map.sample(t),i=h(m(1,1,1),e.progress.sub(n.y).mul(.7)),a=i.add(h(r.rgb,r.a.mul(n.y.oneMinus()))),s=l(e.progress.equal(1),a,i);return h(s.rgb,s.a.mul(e.opacity))}),n=new a.NodeMaterial;return n.fragmentNode=t(),n.transparent=!0,n.depthTest=!1,{material:n,u:e}}var _=[1,5,2,6,3,7,4,8,9,13,10,14,11,15,12,16],v=512,y=512,b=128,x=class extends e.Controller{get config(){return Object.assign({},this._config)}updateState(e,t){let n=this.state;this.state=Object.assign(Object.assign({},this.state),e),this.hooks.emit(`stateChange`,{state:this.state,prevState:n,userAction:t})}updateConfig(e,t={}){var n;let r=this.config,i=Object.assign(Object.assign({},r),e);this._config=i,this.hooks.emit(`configChange`,{prevConfig:r,config:i,userAction:(n=t.userAction)==null?!0:n})}constructor(e,n){super(e),this.group=new a.Group,this.materialUniforms=g(),this.mesh=(()=>{let e=new a.CylinderGeometry(.12,.12,1,32,1,!0);return e.translate(0,.5,0),new a.Mesh(e,this.materialUniforms.material)})(),this.panoMesh=new i({scale:1.5}),this.stop=()=>{},this.drawLine=(e,t)=>{if(!this.ctx)return;let n=(()=>{var t;return 32*((t=_[e])==null?0:t)})(),r=(1-(t+e*150)%1200/1200)*640,i=this.ctx.createLinearGradient(0,r-b,0,r);i.addColorStop(0,`rgba(255,255,255,0)`),i.addColorStop(.5,`rgba(255,255,255,1)`),i.addColorStop(1,`rgba(255,255,255,0)`),this.ctx.fillStyle=i,this.ctx.fillRect(n,r-b,3,b)},this.anime=e=>{if(!this.ctx||!this.startTime)return;this.ctx.clearRect(0,0,v,y);for(let t=0;t<16;t++)this.drawLine(t,e-this.startTime);let n=t((e-this.startTime)/1e3,0,1),r=t((e-this.startTime)/300,0,this.config.maxOpacity);this.panoMesh.setOpacity(r),this.materialUniforms.u.progress.value=n,this.materialUniforms.u.opacity.value=r,this.canvasTexture&&(this.canvasTexture.needsUpdate=!0),this.five.needsRender=!0},this.dispose=()=>{this.disable()},this.five=e;let r={enabled:!1,visible:!0};this.state=Object.assign(r,n==null?void 0:n.initialState);let o=Object.assign(Object.assign({},n==null?void 0:n.config),{maxOpacity:1});this._config=o,!(typeof document>`u`)&&(this.canvas=document.createElement(`canvas`),this.ctx=this.canvas.getContext(`2d`),this.canvas.width=v,this.canvas.height=y,this.ctx.shadowColor=`rgba(255,255,255,0.5)`,this.ctx.shadowBlur=6,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.canvasTexture=new a.CanvasTexture(this.canvas),this.materialUniforms.u.map.value=this.canvasTexture,this.group.add(this.mesh),this.panoMesh.setProgress(1),this.panoMesh.setOpacity(0),this.group.add(this.panoMesh),this.state.enabled&&this._enable({userAction:!1}))}load(e){return n(this,void 0,void 0,function*(){})}_enable(e){this.mesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.panoMesh.position.copy(this.five.observers[this.five.state.panoIndex].standingPosition),this.five.ready().then(()=>{this.five.scene.add(this.group),this.stop=r.shared.add((e,t)=>{this.startTime||(this.startTime=e),this.panoMesh.updateTime(e,t),this.anime(e)})})}_disable(e){this.five.scene.remove(this.group),this.panoMesh.setOpacity(0),this.startTime=void 0,this.stop(),this.five.needsRender=!0}enable(e){var t;if(!this.ctx||this.state.enabled||!this.five.observers[this.five.state.panoIndex])return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!0},n),this._enable({userAction:n})}disable(e){var t;if(this.state.enabled===!1)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!1},n),this._disable({userAction:n})}setState(e,t={}){let n=this.state,r=t.userAction===void 0?!0:t.userAction;if(this.updateState(e,r),e.enabled!==void 0&&n.enabled!==e.enabled){let t={userAction:r};e.enabled?this._enable(t):this._disable(t)}}};export{x as Controller};
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,4 +252,4 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */const e=require("../../_virtual/_rolldown/runtime.js"),t=require("../../node_modules/tslib/tslib.es6.js"),n=require("../BasePlugin/index.js"),r=require("./word-pass.js"),i=require("./textToStrokeOrderStrokes.js");let a=require("three/webgpu");a=e.__toESM(a,1);var o=class extends n.BasePlugin.Controller{updateState(e,t){let n=this.state;this.state=Object.assign(Object.assign({},this.state),e),this.hooks.emit(`stateChange`,{state:this.state,prevState:n,userAction:t})}constructor(e,t){var n,i;super(e),this.dispose=()=>{this.disable(),this.wordPass.dispose()},this.five=e;let o={enabled:!1,visible:!0};this.state=Object.assign(o,t==null?void 0:t.initialState);let s=(i=(n=t==null?void 0:t.config)==null?void 0:n.outputType)==null?e.enableHDR?a.HalfFloatType:a.UnsignedByteType:i;this.wordPass=new r.WordPass(e.camera,s),this.state.enabled&&this._enable()}load(){return t.__awaiter(this,void 0,void 0,function*(){})}_enable(){this.five.addPass(this.wordPass),this.wordPass.enabled=this.state.visible,this.five.needsRender=!0}_disable(){this.five.removePass(this.wordPass),this.wordPass.clearWords(),this.five.needsRender=!0}enable(e){var t;if(this.state.enabled)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!0},n),this._enable()}disable(e){var t;if(this.state.enabled===!1)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!1},n),this._disable()}setState(e,t={}){var n;let r=this.state,i=(n=t.userAction)==null?!0:n;this.updateState(e,i),e.enabled!==void 0&&r.enabled!==e.enabled&&(e.enabled?this._enable():this._disable()),e.visible!==void 0&&r.visible!==e.visible&&(this.wordPass.enabled=e.visible,this.five.needsRender=!0)}setWords(e){let t=this.wordPass.setWords(e);return this.five.needsRender=!0,t}addWord(...e){let t=this.wordPass.addWord(...e);return this.five.needsRender=!0,t}removeWord(...e){let t=this.wordPass.removeWord(...e);return this.five.needsRender=!0,t}setWord(e){this.wordPass.setWord(e),this.five.needsRender=!0}clearWords(){this.wordPass.clearWords(),this.five.needsRender=!0}hasWord(e){return this.wordPass.hasWord(e)}setMaxDisplayBoost(e){this.wordPass.setMaxDisplayBoost(e),this.five.needsRender=!0}writeText(e){return t.__awaiter(this,arguments,void 0,function*(e,n={}){let{size:r,letterSpacing:a,lineSpacing:o,normal:s,up:c,center:l,position:u,smooth:d,smoothSubdivisions:f,cdnBaseUrl:p,charDataLoader:m,latinScale:h}=n,g=t.__rest(n,[`size`,`letterSpacing`,`lineSpacing`,`normal`,`up`,`center`,`position`,`smooth`,`smoothSubdivisions`,`cdnBaseUrl`,`charDataLoader`,`latinScale`]),_=yield i.textToStrokeOrderStrokes(e,{size:r,letterSpacing:a,lineSpacing:o,normal:s,up:c,center:l,position:u,smooth:d,smoothSubdivisions:f,cdnBaseUrl:p,charDataLoader:m,latinScale:h});this.state.enabled||this.enable(),g.id!==void 0&&this.hasWord(g.id)&&this.removeWord(g.id);let[v]=this.addWord(Object.assign(Object.assign({},g),{strokes:_}));return v})}};exports.Controller=o;
255
+ */const e=require("../../_virtual/_rolldown/runtime.js"),t=require("../BasePlugin/index.js"),n=require("./word-pass.js"),r=require("./textToStrokeOrderStrokes.js");let i=require("tslib"),a=require("three/webgpu");a=e.__toESM(a,1);var o=class extends t.BasePlugin.Controller{updateState(e,t){let n=this.state;this.state=Object.assign(Object.assign({},this.state),e),this.hooks.emit(`stateChange`,{state:this.state,prevState:n,userAction:t})}constructor(e,t){var r,i;super(e),this.dispose=()=>{this.disable(),this.wordPass.dispose()},this.five=e;let o={enabled:!1,visible:!0};this.state=Object.assign(o,t==null?void 0:t.initialState);let s=(i=(r=t==null?void 0:t.config)==null?void 0:r.outputType)==null?e.enableHDR?a.HalfFloatType:a.UnsignedByteType:i;this.wordPass=new n.WordPass(e.camera,s),this.state.enabled&&this._enable()}load(){return(0,i.__awaiter)(this,void 0,void 0,function*(){})}_enable(){this.five.addPass(this.wordPass),this.wordPass.enabled=this.state.visible,this.five.needsRender=!0}_disable(){this.five.removePass(this.wordPass),this.wordPass.clearWords(),this.five.needsRender=!0}enable(e){var t;if(this.state.enabled)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!0},n),this._enable()}disable(e){var t;if(this.state.enabled===!1)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!1},n),this._disable()}setState(e,t={}){var n;let r=this.state,i=(n=t.userAction)==null?!0:n;this.updateState(e,i),e.enabled!==void 0&&r.enabled!==e.enabled&&(e.enabled?this._enable():this._disable()),e.visible!==void 0&&r.visible!==e.visible&&(this.wordPass.enabled=e.visible,this.five.needsRender=!0)}setWords(e){let t=this.wordPass.setWords(e);return this.five.needsRender=!0,t}addWord(...e){let t=this.wordPass.addWord(...e);return this.five.needsRender=!0,t}removeWord(...e){let t=this.wordPass.removeWord(...e);return this.five.needsRender=!0,t}setWord(e){this.wordPass.setWord(e),this.five.needsRender=!0}clearWords(){this.wordPass.clearWords(),this.five.needsRender=!0}hasWord(e){return this.wordPass.hasWord(e)}setMaxDisplayBoost(e){this.wordPass.setMaxDisplayBoost(e),this.five.needsRender=!0}writeText(e){return(0,i.__awaiter)(this,arguments,void 0,function*(e,t={}){let{size:n,letterSpacing:a,lineSpacing:o,normal:s,up:c,center:l,position:u,smooth:d,smoothSubdivisions:f,cdnBaseUrl:p,charDataLoader:m,latinScale:h}=t,g=(0,i.__rest)(t,[`size`,`letterSpacing`,`lineSpacing`,`normal`,`up`,`center`,`position`,`smooth`,`smoothSubdivisions`,`cdnBaseUrl`,`charDataLoader`,`latinScale`]),_=yield r.textToStrokeOrderStrokes(e,{size:n,letterSpacing:a,lineSpacing:o,normal:s,up:c,center:l,position:u,smooth:d,smoothSubdivisions:f,cdnBaseUrl:p,charDataLoader:m,latinScale:h});this.state.enabled||this.enable(),g.id!==void 0&&this.hasWord(g.id)&&this.removeWord(g.id);let[v]=this.addWord(Object.assign(Object.assign({},g),{strokes:_}));return v})}};exports.Controller=o;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,4 +252,4 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */import{__awaiter as e,__rest as t}from"../../node_modules/tslib/tslib.es6.mjs";import{BasePlugin as n}from"../BasePlugin/index.mjs";import{WordPass as r}from"./word-pass.mjs";import{textToStrokeOrderStrokes as i}from"./textToStrokeOrderStrokes.mjs";import*as a from"three/webgpu";var o=class extends n.Controller{updateState(e,t){let n=this.state;this.state=Object.assign(Object.assign({},this.state),e),this.hooks.emit(`stateChange`,{state:this.state,prevState:n,userAction:t})}constructor(e,t){var n,i;super(e),this.dispose=()=>{this.disable(),this.wordPass.dispose()},this.five=e;let o={enabled:!1,visible:!0};this.state=Object.assign(o,t==null?void 0:t.initialState);let s=(i=(n=t==null?void 0:t.config)==null?void 0:n.outputType)==null?e.enableHDR?a.HalfFloatType:a.UnsignedByteType:i;this.wordPass=new r(e.camera,s),this.state.enabled&&this._enable()}load(){return e(this,void 0,void 0,function*(){})}_enable(){this.five.addPass(this.wordPass),this.wordPass.enabled=this.state.visible,this.five.needsRender=!0}_disable(){this.five.removePass(this.wordPass),this.wordPass.clearWords(),this.five.needsRender=!0}enable(e){var t;if(this.state.enabled)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!0},n),this._enable()}disable(e){var t;if(this.state.enabled===!1)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!1},n),this._disable()}setState(e,t={}){var n;let r=this.state,i=(n=t.userAction)==null?!0:n;this.updateState(e,i),e.enabled!==void 0&&r.enabled!==e.enabled&&(e.enabled?this._enable():this._disable()),e.visible!==void 0&&r.visible!==e.visible&&(this.wordPass.enabled=e.visible,this.five.needsRender=!0)}setWords(e){let t=this.wordPass.setWords(e);return this.five.needsRender=!0,t}addWord(...e){let t=this.wordPass.addWord(...e);return this.five.needsRender=!0,t}removeWord(...e){let t=this.wordPass.removeWord(...e);return this.five.needsRender=!0,t}setWord(e){this.wordPass.setWord(e),this.five.needsRender=!0}clearWords(){this.wordPass.clearWords(),this.five.needsRender=!0}hasWord(e){return this.wordPass.hasWord(e)}setMaxDisplayBoost(e){this.wordPass.setMaxDisplayBoost(e),this.five.needsRender=!0}writeText(n){return e(this,arguments,void 0,function*(e,n={}){let{size:r,letterSpacing:a,lineSpacing:o,normal:s,up:c,center:l,position:u,smooth:d,smoothSubdivisions:f,cdnBaseUrl:p,charDataLoader:m,latinScale:h}=n,g=t(n,[`size`,`letterSpacing`,`lineSpacing`,`normal`,`up`,`center`,`position`,`smooth`,`smoothSubdivisions`,`cdnBaseUrl`,`charDataLoader`,`latinScale`]),_=yield i(e,{size:r,letterSpacing:a,lineSpacing:o,normal:s,up:c,center:l,position:u,smooth:d,smoothSubdivisions:f,cdnBaseUrl:p,charDataLoader:m,latinScale:h});this.state.enabled||this.enable(),g.id!==void 0&&this.hasWord(g.id)&&this.removeWord(g.id);let[v]=this.addWord(Object.assign(Object.assign({},g),{strokes:_}));return v})}};export{o as Controller};
255
+ */import{BasePlugin as e}from"../BasePlugin/index.mjs";import{WordPass as t}from"./word-pass.mjs";import{textToStrokeOrderStrokes as n}from"./textToStrokeOrderStrokes.mjs";import{__awaiter as r,__rest as i}from"tslib";import*as a from"three/webgpu";var o=class extends e.Controller{updateState(e,t){let n=this.state;this.state=Object.assign(Object.assign({},this.state),e),this.hooks.emit(`stateChange`,{state:this.state,prevState:n,userAction:t})}constructor(e,n){var r,i;super(e),this.dispose=()=>{this.disable(),this.wordPass.dispose()},this.five=e;let o={enabled:!1,visible:!0};this.state=Object.assign(o,n==null?void 0:n.initialState);let s=(i=(r=n==null?void 0:n.config)==null?void 0:r.outputType)==null?e.enableHDR?a.HalfFloatType:a.UnsignedByteType:i;this.wordPass=new t(e.camera,s),this.state.enabled&&this._enable()}load(){return r(this,void 0,void 0,function*(){})}_enable(){this.five.addPass(this.wordPass),this.wordPass.enabled=this.state.visible,this.five.needsRender=!0}_disable(){this.five.removePass(this.wordPass),this.wordPass.clearWords(),this.five.needsRender=!0}enable(e){var t;if(this.state.enabled)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!0},n),this._enable()}disable(e){var t;if(this.state.enabled===!1)return;let n=(t=e==null?void 0:e.userAction)==null?!0:t;this.updateState({enabled:!1},n),this._disable()}setState(e,t={}){var n;let r=this.state,i=(n=t.userAction)==null?!0:n;this.updateState(e,i),e.enabled!==void 0&&r.enabled!==e.enabled&&(e.enabled?this._enable():this._disable()),e.visible!==void 0&&r.visible!==e.visible&&(this.wordPass.enabled=e.visible,this.five.needsRender=!0)}setWords(e){let t=this.wordPass.setWords(e);return this.five.needsRender=!0,t}addWord(...e){let t=this.wordPass.addWord(...e);return this.five.needsRender=!0,t}removeWord(...e){let t=this.wordPass.removeWord(...e);return this.five.needsRender=!0,t}setWord(e){this.wordPass.setWord(e),this.five.needsRender=!0}clearWords(){this.wordPass.clearWords(),this.five.needsRender=!0}hasWord(e){return this.wordPass.hasWord(e)}setMaxDisplayBoost(e){this.wordPass.setMaxDisplayBoost(e),this.five.needsRender=!0}writeText(e){return r(this,arguments,void 0,function*(e,t={}){let{size:r,letterSpacing:a,lineSpacing:o,normal:s,up:c,center:l,position:u,smooth:d,smoothSubdivisions:f,cdnBaseUrl:p,charDataLoader:m,latinScale:h}=t,g=i(t,[`size`,`letterSpacing`,`lineSpacing`,`normal`,`up`,`center`,`position`,`smooth`,`smoothSubdivisions`,`cdnBaseUrl`,`charDataLoader`,`latinScale`]),_=yield n(e,{size:r,letterSpacing:a,lineSpacing:o,normal:s,up:c,center:l,position:u,smooth:d,smoothSubdivisions:f,cdnBaseUrl:p,charDataLoader:m,latinScale:h});this.state.enabled||this.enable(),g.id!==void 0&&this.hasWord(g.id)&&this.removeWord(g.id);let[v]=this.addWord(Object.assign(Object.assign({},g),{strokes:_}));return v})}};export{o as Controller};
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,5 +252,5 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */const e=require("../../_virtual/_rolldown/runtime.js"),t=require("../../node_modules/tslib/tslib.es6.js"),n=require("./hersheyFont.js");let r=require("three/webgpu");r=e.__toESM(r,1);var i=1024,a=`https://cdn.jsdelivr.net/npm/hanzi-writer-data@latest`;function o(e){let t=0;for(let n=1;n<e.length;n++)t+=e[n].distanceTo(e[n-1]);return t}var s=new Map;function c(e,n,r){return t.__awaiter(this,void 0,void 0,function*(){var t;if(s.has(e))return s.get(e);let i=null;try{if(n)i=(t=yield n(e))==null?null:t;else if(typeof fetch<`u`){let t=yield fetch(`${r}/${encodeURIComponent(e)}.json`);t.ok&&(i=yield t.json())}}catch(e){i=null}return s.set(e,i),i})}function l(e){return t.__awaiter(this,arguments,void 0,function*(e,t={}){var s;let{size:l=1,letterSpacing:d=0,lineSpacing:p=1.4,normal:m,up:h,center:g=!0,position:_,smooth:v=!0,smoothSubdivisions:y=4,cdnBaseUrl:b=a,charDataLoader:x,latinScale:S=.72}=t,C=n.loadHersheyFont(),w=[],T=0,E=0;for(let t of Array.from(e)){if(t===`
255
+ */const e=require("../../_virtual/_rolldown/runtime.js"),t=require("./hersheyFont.js");let n=require("tslib"),r=require("three/webgpu");r=e.__toESM(r,1);var i=1024,a=`https://cdn.jsdelivr.net/npm/hanzi-writer-data@latest`;function o(e){let t=0;for(let n=1;n<e.length;n++)t+=e[n].distanceTo(e[n-1]);return t}var s=new Map;function c(e,t,r){return(0,n.__awaiter)(this,void 0,void 0,function*(){var n;if(s.has(e))return s.get(e);let i=null;try{if(t)i=(n=yield t(e))==null?null:n;else if(typeof fetch<`u`){let t=yield fetch(`${r}/${encodeURIComponent(e)}.json`);t.ok&&(i=yield t.json())}}catch(e){i=null}return s.set(e,i),i})}function l(e){return(0,n.__awaiter)(this,arguments,void 0,function*(e,n={}){var s;let{size:l=1,letterSpacing:d=0,lineSpacing:p=1.4,normal:m,up:h,center:g=!0,position:_,smooth:v=!0,smoothSubdivisions:y=4,cdnBaseUrl:b=a,charDataLoader:x,latinScale:S=.72}=n,C=t.loadHersheyFont(),w=[],T=0,E=0;for(let t of Array.from(e)){if(t===`
256
256
  `){T=0,E-=p;continue}if(t===` `){T+=.4+d;continue}let e=(s=t.codePointAt(0))==null?0:s;if(e>=33&&e<=126){let n=C==null?void 0:C.get(e);if(n){for(let e of n.polylines)e.length<2||w.push({pts:e.map(([e,t])=>new r.Vector2(T+e*S,E+t*S)),mode:`corner`});T+=n.advance*S+d;continue}console.warn(`textToStrokeOrderStrokes: 无法生成字符 "${t}"(非浏览器环境或字形为空),按空格处理`),T+=.5*S+d;continue}let n=yield c(t,x,b);if(n&&n.medians&&n.medians.length){for(let e of n.medians)e.length<2||w.push({pts:e.map(([e,t])=>new r.Vector2(T+e/i,E+t/i)),mode:`full`});T+=1+d}else console.warn(`textToStrokeOrderStrokes: 未找到 "${t}" 的笔画数据,按空格处理`),T+=1+d}if(w.length===0)return[];let D=1/0,O=1/0,k=-1/0,A=-1/0;for(let e of w)for(let t of e.pts)t.x<D&&(D=t.x),t.x>k&&(k=t.x),t.y<O&&(O=t.y),t.y>A&&(A=t.y);let j=g?(D+k)/2:0,M=g?(O+A)/2:0,N=_==null?new r.Vector3:_,P=(m==null?new r.Vector3(0,0,1):m).clone();P.lengthSq()<1e-9&&P.set(0,0,1),P.normalize();let F;if(h){let e=h.clone().addScaledVector(P,-h.dot(P));e.lengthSq()>1e-9&&(F=e.normalize())}let I;if(F)I=new r.Vector3().crossVectors(F,P).normalize();else{let e=Math.abs(P.y)>.99?new r.Vector3(0,0,-1):new r.Vector3(0,1,0);I=new r.Vector3().crossVectors(e,P).normalize(),F=new r.Vector3().crossVectors(P,I).normalize()}let L=e=>new r.Vector3().copy(N).addScaledVector(I,(e.x-j)*l).addScaledVector(F,(e.y-M)*l);return w.map(e=>{let t=e.pts.map(L);return v&&t.length>=2&&(t=e.mode===`corner`?f(t,y):u(t,y)),{points:t,totalLength:o(t)}})})}function u(e,t){return e.length<3?e:new r.CatmullRomCurve3(e,!1,`centripetal`).getPoints(Math.max(e.length*t,8))}var d=.2;function f(e,t){if(e.length<3)return e;let n=new r.Box3().setFromPoints(e),i=n.min.distanceTo(n.max),a=i>1e-9&&e[0].distanceTo(e[e.length-1])<i*.06,o=a?e.slice(0,-1):e,s=o.length;if(s<3)return e;let c=new r.Vector3,l=new r.Vector3,u=e=>{if(!a&&(e===0||e===s-1))return!0;let t=(e-1+s)%s,n=(e+1)%s;c.subVectors(o[e],o[t]),l.subVectors(o[n],o[e]);let r=c.length(),i=l.length();return r<1e-6||i<1e-6?!1:c.dot(l)/(r*i)<d},f=[];for(let e=0;e<s;e++)u(e)&&f.push(e);if(f.length===0)return new r.CatmullRomCurve3(o,a,`centripetal`).getPoints(Math.max(s*t,8));let p=(e,t)=>{let n=[],r=e;for(;n.push(o[r]),r!==t;)r=(r+1)%s;return n},m=f.length,h=a?m:m-1,g=[];for(let e=0;e<h;e++){let n=p(f[e],f[(e+1)%m]),i=n.length>=3?new r.CatmullRomCurve3(n,!1,`centripetal`).getPoints(Math.max((n.length-1)*t,2)):n;for(let t=0;t<i.length;t++)e>0&&t===0||g.push(i[t])}return g}exports.textToStrokeOrderStrokes=l;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,5 +252,5 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */import{__awaiter as e}from"../../node_modules/tslib/tslib.es6.mjs";import{loadHersheyFont as t}from"./hersheyFont.mjs";import*as n from"three/webgpu";var r=1024,i=`https://cdn.jsdelivr.net/npm/hanzi-writer-data@latest`;function a(e){let t=0;for(let n=1;n<e.length;n++)t+=e[n].distanceTo(e[n-1]);return t}var o=new Map;function s(t,n,r){return e(this,void 0,void 0,function*(){var e;if(o.has(t))return o.get(t);let i=null;try{if(n)i=(e=yield n(t))==null?null:e;else if(typeof fetch<`u`){let e=yield fetch(`${r}/${encodeURIComponent(t)}.json`);e.ok&&(i=yield e.json())}}catch(e){i=null}return o.set(t,i),i})}function c(o){return e(this,arguments,void 0,function*(e,o={}){var c;let{size:u=1,letterSpacing:f=0,lineSpacing:p=1.4,normal:m,up:h,center:g=!0,position:_,smooth:v=!0,smoothSubdivisions:y=4,cdnBaseUrl:b=i,charDataLoader:x,latinScale:S=.72}=o,C=t(),w=[],T=0,E=0;for(let t of Array.from(e)){if(t===`
256
- `){T=0,E-=p;continue}if(t===` `){T+=.4+f;continue}let e=(c=t.codePointAt(0))==null?0:c;if(e>=33&&e<=126){let r=C==null?void 0:C.get(e);if(r){for(let e of r.polylines)e.length<2||w.push({pts:e.map(([e,t])=>new n.Vector2(T+e*S,E+t*S)),mode:`corner`});T+=r.advance*S+f;continue}console.warn(`textToStrokeOrderStrokes: 无法生成字符 "${t}"(非浏览器环境或字形为空),按空格处理`),T+=.5*S+f;continue}let i=yield s(t,x,b);if(i&&i.medians&&i.medians.length){for(let e of i.medians)e.length<2||w.push({pts:e.map(([e,t])=>new n.Vector2(T+e/r,E+t/r)),mode:`full`});T+=1+f}else console.warn(`textToStrokeOrderStrokes: 未找到 "${t}" 的笔画数据,按空格处理`),T+=1+f}if(w.length===0)return[];let D=1/0,O=1/0,k=-1/0,A=-1/0;for(let e of w)for(let t of e.pts)t.x<D&&(D=t.x),t.x>k&&(k=t.x),t.y<O&&(O=t.y),t.y>A&&(A=t.y);let j=g?(D+k)/2:0,M=g?(O+A)/2:0,N=_==null?new n.Vector3:_,P=(m==null?new n.Vector3(0,0,1):m).clone();P.lengthSq()<1e-9&&P.set(0,0,1),P.normalize();let F;if(h){let e=h.clone().addScaledVector(P,-h.dot(P));e.lengthSq()>1e-9&&(F=e.normalize())}let I;if(F)I=new n.Vector3().crossVectors(F,P).normalize();else{let e=Math.abs(P.y)>.99?new n.Vector3(0,0,-1):new n.Vector3(0,1,0);I=new n.Vector3().crossVectors(e,P).normalize(),F=new n.Vector3().crossVectors(P,I).normalize()}let L=e=>new n.Vector3().copy(N).addScaledVector(I,(e.x-j)*u).addScaledVector(F,(e.y-M)*u);return w.map(e=>{let t=e.pts.map(L);return v&&t.length>=2&&(t=e.mode===`corner`?d(t,y):l(t,y)),{points:t,totalLength:a(t)}})})}function l(e,t){return e.length<3?e:new n.CatmullRomCurve3(e,!1,`centripetal`).getPoints(Math.max(e.length*t,8))}var u=.2;function d(e,t){if(e.length<3)return e;let r=new n.Box3().setFromPoints(e),i=r.min.distanceTo(r.max),a=i>1e-9&&e[0].distanceTo(e[e.length-1])<i*.06,o=a?e.slice(0,-1):e,s=o.length;if(s<3)return e;let c=new n.Vector3,l=new n.Vector3,d=e=>{if(!a&&(e===0||e===s-1))return!0;let t=(e-1+s)%s,n=(e+1)%s;c.subVectors(o[e],o[t]),l.subVectors(o[n],o[e]);let r=c.length(),i=l.length();return r<1e-6||i<1e-6?!1:c.dot(l)/(r*i)<u},f=[];for(let e=0;e<s;e++)d(e)&&f.push(e);if(f.length===0)return new n.CatmullRomCurve3(o,a,`centripetal`).getPoints(Math.max(s*t,8));let p=(e,t)=>{let n=[],r=e;for(;n.push(o[r]),r!==t;)r=(r+1)%s;return n},m=f.length,h=a?m:m-1,g=[];for(let e=0;e<h;e++){let r=p(f[e],f[(e+1)%m]),i=r.length>=3?new n.CatmullRomCurve3(r,!1,`centripetal`).getPoints(Math.max((r.length-1)*t,2)):r;for(let t=0;t<i.length;t++)e>0&&t===0||g.push(i[t])}return g}export{c as textToStrokeOrderStrokes};
255
+ */import{loadHersheyFont as e}from"./hersheyFont.mjs";import{__awaiter as t}from"tslib";import*as n from"three/webgpu";var r=1024,i=`https://cdn.jsdelivr.net/npm/hanzi-writer-data@latest`;function a(e){let t=0;for(let n=1;n<e.length;n++)t+=e[n].distanceTo(e[n-1]);return t}var o=new Map;function s(e,n,r){return t(this,void 0,void 0,function*(){var t;if(o.has(e))return o.get(e);let i=null;try{if(n)i=(t=yield n(e))==null?null:t;else if(typeof fetch<`u`){let t=yield fetch(`${r}/${encodeURIComponent(e)}.json`);t.ok&&(i=yield t.json())}}catch(e){i=null}return o.set(e,i),i})}function c(o){return t(this,arguments,void 0,function*(t,o={}){var c;let{size:u=1,letterSpacing:f=0,lineSpacing:p=1.4,normal:m,up:h,center:g=!0,position:_,smooth:v=!0,smoothSubdivisions:y=4,cdnBaseUrl:b=i,charDataLoader:x,latinScale:S=.72}=o,C=e(),w=[],T=0,E=0;for(let e of Array.from(t)){if(e===`
256
+ `){T=0,E-=p;continue}if(e===` `){T+=.4+f;continue}let t=(c=e.codePointAt(0))==null?0:c;if(t>=33&&t<=126){let r=C==null?void 0:C.get(t);if(r){for(let e of r.polylines)e.length<2||w.push({pts:e.map(([e,t])=>new n.Vector2(T+e*S,E+t*S)),mode:`corner`});T+=r.advance*S+f;continue}console.warn(`textToStrokeOrderStrokes: 无法生成字符 "${e}"(非浏览器环境或字形为空),按空格处理`),T+=.5*S+f;continue}let i=yield s(e,x,b);if(i&&i.medians&&i.medians.length){for(let e of i.medians)e.length<2||w.push({pts:e.map(([e,t])=>new n.Vector2(T+e/r,E+t/r)),mode:`full`});T+=1+f}else console.warn(`textToStrokeOrderStrokes: 未找到 "${e}" 的笔画数据,按空格处理`),T+=1+f}if(w.length===0)return[];let D=1/0,O=1/0,k=-1/0,A=-1/0;for(let e of w)for(let t of e.pts)t.x<D&&(D=t.x),t.x>k&&(k=t.x),t.y<O&&(O=t.y),t.y>A&&(A=t.y);let j=g?(D+k)/2:0,M=g?(O+A)/2:0,N=_==null?new n.Vector3:_,P=(m==null?new n.Vector3(0,0,1):m).clone();P.lengthSq()<1e-9&&P.set(0,0,1),P.normalize();let F;if(h){let e=h.clone().addScaledVector(P,-h.dot(P));e.lengthSq()>1e-9&&(F=e.normalize())}let I;if(F)I=new n.Vector3().crossVectors(F,P).normalize();else{let e=Math.abs(P.y)>.99?new n.Vector3(0,0,-1):new n.Vector3(0,1,0);I=new n.Vector3().crossVectors(e,P).normalize(),F=new n.Vector3().crossVectors(P,I).normalize()}let L=e=>new n.Vector3().copy(N).addScaledVector(I,(e.x-j)*u).addScaledVector(F,(e.y-M)*u);return w.map(e=>{let t=e.pts.map(L);return v&&t.length>=2&&(t=e.mode===`corner`?d(t,y):l(t,y)),{points:t,totalLength:a(t)}})})}function l(e,t){return e.length<3?e:new n.CatmullRomCurve3(e,!1,`centripetal`).getPoints(Math.max(e.length*t,8))}var u=.2;function d(e,t){if(e.length<3)return e;let r=new n.Box3().setFromPoints(e),i=r.min.distanceTo(r.max),a=i>1e-9&&e[0].distanceTo(e[e.length-1])<i*.06,o=a?e.slice(0,-1):e,s=o.length;if(s<3)return e;let c=new n.Vector3,l=new n.Vector3,d=e=>{if(!a&&(e===0||e===s-1))return!0;let t=(e-1+s)%s,n=(e+1)%s;c.subVectors(o[e],o[t]),l.subVectors(o[n],o[e]);let r=c.length(),i=l.length();return r<1e-6||i<1e-6?!1:c.dot(l)/(r*i)<u},f=[];for(let e=0;e<s;e++)d(e)&&f.push(e);if(f.length===0)return new n.CatmullRomCurve3(o,a,`centripetal`).getPoints(Math.max(s*t,8));let p=(e,t)=>{let n=[],r=e;for(;n.push(o[r]),r!==t;)r=(r+1)%s;return n},m=f.length,h=a?m:m-1,g=[];for(let e=0;e<h;e++){let r=p(f[e],f[(e+1)%m]),i=r.length>=3?new n.CatmullRomCurve3(r,!1,`centripetal`).getPoints(Math.max((r.length-1)*t,2)):r;for(let t=0;t<i.length;t++)e>0&&t===0||g.push(i[t])}return g}export{c as textToStrokeOrderStrokes};