@shijiu/jsview-vue 2.3.151-test.0 → 3.0.0

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 (244) hide show
  1. package/bin/browser/BrowserAudio.mjs +200 -0
  2. package/bin/browser/BrowserJsvLatex.mjs +61 -0
  3. package/bin/export-sfc.mjs +8 -9
  4. package/bin/jsview-vue-common.mjs +9 -35
  5. package/bin/jsview-vue.mjs +22246 -23643
  6. package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +9 -71
  7. package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +18 -2
  8. package/bin/types/utils/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -1
  9. package/bin/types/utils/JsViewEngineWidget/MetroWidget/DebugFrame.vue.d.ts +10 -7
  10. package/bin/types/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +19 -178
  11. package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +19 -178
  12. package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +24 -3
  13. package/bin/types/utils/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +7 -1
  14. package/bin/types/utils/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +25 -5
  15. package/bin/types/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +9 -47
  16. package/bin/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +2 -1
  17. package/bin/types/utils/JsViewEngineWidget/MetroWidget/Utils.d.ts +2 -0
  18. package/bin/types/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +1 -1
  19. package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue.d.ts +40 -0
  20. package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.d.ts +24 -0
  21. package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.d.ts +19 -0
  22. package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.d.ts +42 -0
  23. package/bin/types/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +2 -1
  24. package/bin/types/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +2 -1
  25. package/bin/types/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +6 -4
  26. package/bin/types/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +9 -7
  27. package/bin/types/utils/JsViewEngineWidget/WidgetCommon.d.ts +17 -7
  28. package/bin/types/utils/JsViewEngineWidget/index.d.ts +3 -1
  29. package/bin/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +140 -7
  30. package/bin/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +12 -11
  31. package/bin/types/utils/JsViewPlugin/JsvAudio/Events.d.ts +10 -10
  32. package/bin/types/utils/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +204 -17
  33. package/bin/types/utils/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +2 -1
  34. package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.mts +11 -11
  35. package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.ts +11 -11
  36. package/bin/types/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +0 -1
  37. package/bin/types/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +75 -12
  38. package/bin/types/utils/JsViewPlugin/JsvLatex/GetVersion.d.ts +14 -0
  39. package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +88 -13
  40. package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +1 -0
  41. package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +5 -1
  42. package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +39 -12
  43. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +120 -17
  44. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +62 -0
  45. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +108 -29
  46. package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue.d.ts → JsvPlayerBrowser-0.9.vue.d.ts} +8 -7
  47. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-wasm.vue.d.ts +614 -0
  48. package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue.d.ts → JsvPlayerBrowser.vue.d.ts} +36 -34
  49. package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +89 -30
  50. package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +89 -30
  51. package/bin/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +11 -11
  52. package/bin/types/utils/JsViewVueTools/BlobApi.d.ts +38 -0
  53. package/bin/types/utils/JsViewVueTools/DebugTool.d.ts +1 -1
  54. package/bin/types/utils/JsViewVueTools/DefaultKeyMap.d.ts +7 -7
  55. package/bin/types/utils/JsViewVueTools/FeatureActive.d.ts +1 -0
  56. package/bin/types/utils/JsViewVueTools/JsvInteractionMode.d.ts +6 -0
  57. package/bin/types/utils/JsViewVueTools/JsvRuntimeBridge.d.ts +3 -3
  58. package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +1 -0
  59. package/bin/types/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.d.ts +43 -0
  60. package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +1 -0
  61. package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.d.ts +54 -0
  62. package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +13 -0
  63. package/bin/types/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +2 -0
  64. package/bin/types/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +76 -26
  65. package/bin/types/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.d.ts +49 -0
  66. package/bin/types/utils/JsViewVueTools/JsvTextureStore/index.d.ts +2 -0
  67. package/bin/types/utils/JsViewVueTools/index.d.ts +4 -1
  68. package/bin/types/utils/JsViewVueWidget/Jsv3dDiv.vue.d.ts +10 -98
  69. package/bin/types/utils/JsViewVueWidget/Jsv3dStage.vue.d.ts +10 -114
  70. package/bin/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +20 -61
  71. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +44 -13
  72. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +12 -11
  73. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +5 -5
  74. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +16 -10
  75. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +21 -17
  76. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +19 -16
  77. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +7 -7
  78. package/bin/types/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +12 -66
  79. package/bin/types/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +73 -12
  80. package/bin/types/utils/JsViewVueWidget/JsvDashPath.vue.d.ts +59 -10
  81. package/bin/types/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +41 -81
  82. package/bin/types/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +17 -100
  83. package/bin/types/utils/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +13 -50
  84. package/bin/types/utils/JsViewVueWidget/JsvFilterView.vue.d.ts +50 -70
  85. package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +32 -68
  86. package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvFullScrAdjust.vue.d.ts +57 -74
  87. package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +41 -71
  88. package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +83 -14
  89. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +151 -18
  90. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +79 -83
  91. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvFreeMoveActor.vue.d.ts +70 -0
  92. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +20 -0
  93. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +108 -5
  94. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +88 -3
  95. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +6 -1
  96. package/bin/types/utils/JsViewVueWidget/JsvGrid.vue.d.ts +19 -18
  97. package/bin/types/utils/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +34 -11
  98. package/bin/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +4 -1
  99. package/bin/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +193 -6
  100. package/bin/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +54 -11
  101. package/bin/types/utils/JsViewVueWidget/JsvMarquee.vue.d.ts +89 -11
  102. package/bin/types/utils/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +9 -8
  103. package/bin/types/utils/JsViewVueWidget/JsvMindMap/Geometry.d.ts +2 -2
  104. package/bin/types/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +170 -138
  105. package/bin/types/utils/JsViewVueWidget/JsvMindMap/rtree.d.ts +5 -5
  106. package/bin/types/utils/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +48 -72
  107. package/bin/types/utils/JsViewVueWidget/JsvNinePatch.vue.d.ts +139 -20
  108. package/bin/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +56 -8
  109. package/bin/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +20 -11
  110. package/bin/types/utils/JsViewVueWidget/JsvProgressBar.vue.d.ts +63 -11
  111. package/bin/types/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +8 -7
  112. package/bin/types/utils/JsViewVueWidget/JsvRadarChart.vue.d.ts +95 -12
  113. package/bin/types/utils/JsViewVueWidget/JsvRipple/Constant.d.ts +2 -2
  114. package/bin/types/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +51 -78
  115. package/bin/types/utils/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +5 -4
  116. package/bin/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +84 -193
  117. package/bin/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +23 -148
  118. package/bin/types/utils/JsViewVueWidget/JsvSector.vue.d.ts +56 -9
  119. package/bin/types/utils/JsViewVueWidget/JsvSmoothSlideContainer.vue.d.ts +22 -67
  120. package/bin/types/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +44 -10
  121. package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +47 -14
  122. package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +26 -67
  123. package/bin/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +7 -6
  124. package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSmoothSwiper.vue.d.ts +147 -109
  125. package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +173 -16
  126. package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper2.vue.d.ts +216 -139
  127. package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +7 -6
  128. package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +101 -96
  129. package/bin/types/utils/JsViewVueWidget/JsvTextBox.vue.d.ts +89 -74
  130. package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +21 -20
  131. package/bin/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +43 -70
  132. package/bin/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +6 -5
  133. package/bin/types/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +62 -82
  134. package/bin/types/utils/JsViewVueWidget/JsvVisibleSensor/index.d.ts +95 -74
  135. package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue.d.ts +51 -0
  136. package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue.d.ts +105 -0
  137. package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue.d.ts +51 -0
  138. package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue.d.ts +105 -0
  139. package/bin/types/utils/JsViewVueWidget/index.d.ts +5 -3
  140. package/package.json +2 -2
  141. package/tools/jsview-vue-build.mjs +13 -9
  142. package/tsconfig.json +2 -2
  143. package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +32 -16
  144. package/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.ts +24 -2
  145. package/utils/JsViewEngineWidget/MetroWidget/Const.ts +5 -0
  146. package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +183 -89
  147. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +269 -122
  148. package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +989 -357
  149. package/utils/JsViewEngineWidget/MetroWidget/PageUpdater.ts +41 -23
  150. package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +138 -41
  151. package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +1 -0
  152. package/utils/JsViewEngineWidget/MetroWidget/Utils.ts +6 -0
  153. package/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.ts +2 -1
  154. package/utils/JsViewEngineWidget/RectUtils.js +1 -1
  155. package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue +50 -0
  156. package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.ts +260 -0
  157. package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.ts +32 -0
  158. package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.ts +236 -0
  159. package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +342 -174
  160. package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +101 -27
  161. package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +12 -5
  162. package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +109 -41
  163. package/utils/JsViewEngineWidget/WidgetCommon.ts +17 -7
  164. package/utils/JsViewEngineWidget/index.ts +7 -2
  165. package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +46 -46
  166. package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +54 -41
  167. package/utils/JsViewPlugin/JsvLatex/GetVersion.js +65 -0
  168. package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +54 -12
  169. package/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.js +10 -0
  170. package/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue +15 -2
  171. package/utils/JsViewPlugin/JsvLatex/PluginLoader.js +63 -31
  172. package/utils/JsViewPlugin/JsvLatex/version.mjs +26 -13
  173. package/utils/JsViewPlugin/JsvPlayer/GetVersion.js +2 -1
  174. package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +402 -23
  175. package/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.js +100 -0
  176. package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +363 -468
  177. package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue → JsvPlayerBrowser-wasm.vue} +60 -10
  178. package/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue +511 -0
  179. package/utils/JsViewPlugin/JsvPlayer/index-0.9.js +52 -10
  180. package/utils/JsViewPlugin/JsvPlayer/index.js +58 -9
  181. package/utils/JsViewPlugin/JsvPlayer/package.json +8 -0
  182. package/utils/JsViewVueTools/BlobApi.ts +55 -0
  183. package/utils/JsViewVueTools/FeatureActive.ts +3 -0
  184. package/utils/JsViewVueTools/ForgeHandles.ts +3 -0
  185. package/utils/JsViewVueTools/JsvInteractionMode.js +16 -0
  186. package/utils/JsViewVueTools/JsvPreDownloader.ts +2 -2
  187. package/utils/JsViewVueTools/JsvRuntimeBridge.js +25 -18
  188. package/utils/JsViewVueTools/JsvTextTools.ts +9 -1
  189. package/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.ts +180 -0
  190. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.ts +1 -0
  191. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.ts +304 -0
  192. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.ts +38 -0
  193. package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +16 -1
  194. package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +154 -69
  195. package/utils/JsViewVueTools/JsvTextureStore/Store.ts +1 -1
  196. package/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.ts +92 -0
  197. package/utils/JsViewVueTools/JsvTextureStore/index.js +2 -0
  198. package/utils/JsViewVueTools/index.js +3 -1
  199. package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +111 -86
  200. package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +1 -1
  201. package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +11 -2
  202. package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +1 -1
  203. package/utils/JsViewVueWidget/JsvEnableRenderBreak.vue +6 -0
  204. package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +11 -5
  205. package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +3 -1
  206. package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +23 -11
  207. package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +242 -25
  208. package/utils/JsViewVueWidget/JsvFreeMoveActor/{FreeMoveActor.vue → JsvFreeMoveActor.vue} +1 -1
  209. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +11 -5
  210. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +118 -6
  211. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +56 -14
  212. package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +2 -1
  213. package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +11 -2
  214. package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +30 -2
  215. package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +24 -7
  216. package/utils/JsViewVueWidget/JsvMarquee.vue +1 -1
  217. package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +12 -10
  218. package/utils/JsViewVueWidget/JsvNinePatch.vue +13 -8
  219. package/utils/JsViewVueWidget/JsvPieChart.vue +93 -70
  220. package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +32 -29
  221. package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +2 -1
  222. package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +25 -3
  223. package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +0 -3
  224. package/utils/JsViewVueWidget/JsvSector.vue +66 -28
  225. package/utils/JsViewVueWidget/JsvTextBox.vue +30 -1
  226. package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +56 -14
  227. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +8 -6
  228. package/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue +54 -0
  229. package/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue +88 -0
  230. package/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue +177 -0
  231. package/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue +267 -0
  232. package/utils/JsViewVueWidget/index.js +6 -2
  233. package/bin/browser/BrowserAudio.vue.mjs +0 -258
  234. package/bin/browser/BrowserJsvLatex.vue.mjs +0 -145
  235. package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.ts +0 -10
  236. package/bin/types/utils/JsViewVueTools/JsvTextureStore/DominantColor/GetDominantColor.d.ts +0 -7
  237. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +0 -78
  238. package/bin/types/utils/JsViewVueWidget/JsvPosterDiv.vue.d.ts +0 -63
  239. package/bin/types/utils/JsViewVueWidget/JsvPosterImage.vue.d.ts +0 -78
  240. package/utils/JsViewPlugin/JsvLatex/version.js +0 -24
  241. package/utils/JsViewVueTools/JsvTextureStore/DominantColor/GetDominantColor.ts +0 -36
  242. package/utils/JsViewVueWidget/JsvPosterDiv.vue +0 -56
  243. package/utils/JsViewVueWidget/JsvPosterImage.vue +0 -105
  244. /package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue → JsvPlayerBrowser-0.9.vue} +0 -0
@@ -4,6 +4,56 @@
4
4
  * @LastEditors: donglin.lu@qcast.cn
5
5
  * @Description: file content
6
6
  */
7
+
8
+ /*
9
+ * ActorControl
10
+ * 对 JsvFreeMoveActorDiv 进行控制
11
+ *
12
+ * 开发者通过 ActorControl 的实例, 来对 JsvFreeMoveActorDiv 进行控制, 思路:
13
+ * 拿到ActorControl实例后, 通过 run(cmdPackList) 讲编排好的指令集一次性组织好, 送到render进行执行,
14
+ * 执行过程中,除了condition触发的(ActorState)=>{} 类型的回调外, 其余动画处理都不会与js端进行交互。
15
+ *
16
+ * 进行动画设计时, 尽量避免 (ActorState)=>{} 回调中再调用 ActorControl.run(...)的模式, 以规避js性能低的问题影响到动画的流畅性。
17
+ * 比较好的设计模式是, ActorControl.run(...) 几乎都是界面初始化或者用户输入时进行(例如focusBlock的onKeyDown),
18
+ * 而 (ActorState)=>{} 回调中, 最好只放置辅助用户输入判断的状态的更新, 以及 state().updateBaseOffset(...) 这种对dom元素进行重新定位的场景。
19
+ * dom元素重新定位也一般只用于动画结束,要永久保留动画后的位置的场景。
20
+ *
21
+ * cmdPackList:
22
+ * 由 action(), state(), condition() 组成的指令集
23
+ * 在condition().xxxx.then() 中, 多一种指令类型 (actorState)=>{}, 用于对接此condition触发后, 讲actor信息同步给js
24
+ *
25
+ * ------------------------------------------------------------
26
+ * 以下是 JsvFreeMoveActorDiv 中坐标概念说明:
27
+ *
28
+ * JsvFreeMoveActorDiv 的基准坐标: baseX, baseY
29
+ * 此坐标不会被直接记录, 在组件内部以 baseOffsetX, baseOffsetY 记录, 初始值为(0, 0)
30
+ * baseX = -baseOffsetX
31
+ * baseY = -baseOffsetY
32
+ * 主要用于解决div的style.top, style.left改变前后, condition设置的条件中的坐标不会发生偏移。
33
+ * 具体思路是: condition创建时, 会记录当时的 baseOffset 坐标, 进行判断的时候将其条件中设定的x和y以当时记录的baseOffset转成baseX和baseY坐标,
34
+ * 而与之进行比较的 drawX 和 drawY, 也通过最新的baseOffset转成baseX和baseY坐标, 然后再进行比较。
35
+ * baseOffset的变更, 发生在本div的style.top, style.left进行改变时, 开发者会通过 state().updateBaseOffset(
36
+ * originStyle.top - style.top,
37
+ * originStyle.left - style.left) 主动同步信息到控制系统。
38
+ *
39
+ * JsvFreeMoveActorDiv 的绘制坐标: drawX, drawY
40
+ *
41
+ * JsvFreeMoveActorDiv 的最终屏幕坐标:
42
+ * x = 父dom节点的屏幕坐标x + 本div的style.left + drawX;
43
+ * y = 父dom节点的屏幕坐标y + 本div的style.top + drawY;
44
+ *
45
+ * ------------------------------------------------------------
46
+ * 每个JsvFreeMoveActorDiv内部状态变量分为8个:
47
+ * drawX: 参考上述坐标说明, 每帧会被SpeedX调整, 也可通过 action() 或者 state() 直接改变
48
+ * drawY: 参考上述坐标说明, 每帧会被SpeedY调整, 也可通过 action() 或者 state() 直接改变
49
+ * baseOffsetX: 参考上述坐标说明, 改变方式只有 state().updateBaseOffset(...)
50
+ * baseOffsetY: 参考上述坐标说明, 改变方式只有 state().updateBaseOffset(...)
51
+ * SpeedX: 帧间运行后,对drawX的增量, 只能通过 action() 改变
52
+ * SpeedY: 帧间运行后,对drawY的增量, 只能通过 action() 改变
53
+ * AccelerationX: 帧间运行后,对SpeedX的增量, 只能通过 action() 改变
54
+ * AccelerationY: 帧间运行后,对SpeedY的增量, 只能通过 action() 改变
55
+ */
56
+
7
57
  import ConditionPackBuilder from "./SetCondition";
8
58
  import ActionPackBuilder from "./SetAction"
9
59
  import StatePackBuilder from "./SetState";
@@ -16,6 +66,19 @@ interface CmdListCreator {
16
66
  (builders: BuilderFactory): Array<Object>;
17
67
  }
18
68
 
69
+ interface ConditionConfig {
70
+ group?: number;
71
+ multiTimes?: boolean;
72
+ specName?: string | null;
73
+ shoudRenderBreak?: boolean;
74
+ }
75
+
76
+ interface ActionConfig {
77
+ xySpeedKeeps?: number;
78
+ xyAccKeeps?: number;
79
+ nexusRecv?: NexusNode | null;
80
+ }
81
+
19
82
  class BuilderFactory {
20
83
  private _SharedQuickConditionPackBuilder: ConditionPackBuilder;
21
84
  private _SharedQuickActionPackBuilder: ActionPackBuilder;
@@ -36,67 +99,167 @@ class BuilderFactory {
36
99
 
37
100
  /**
38
101
  * Condition
39
- * 获取创建 ConditionPack 的工厂对象
102
+ * 获取创建 Condition指令 的工厂对象
103
+ * 用法示例:
104
+ * actorControl.run((cmds)=>[ // cmds: 即为 BuilderFactory 的实例
105
+ * cmds.condition(...).条件指令(...).then([ // 条件指令: 例如 wallPosition()
106
+ * cmds.condition(...).其他条件指令(...), // 其他condition创建
107
+ * (actorState)=>{
108
+ * // 条件满足时预设的指令集
109
+ * console.log(
110
+ * "condition triggered",
111
+ * actorState.xPos, actorState.yPos,
112
+ * actorState.xSpd, actorState.ySpd,
113
+ * actorState.xAcc, actorState.yAcc);
114
+ * },
115
+ * ... // 其他command
116
+ * ]),
117
+ * ... // 其他command
118
+ * ]);
119
+ *
40
120
  * ConditionPack对应支持 .then(cmdPackList), 可传入同 Run 的处理队列
41
- * 可用方法见 ./SetCondition.js
42
- * @param {int} group 可选参数,默认为0, 有效值为0~3, 对应默认组, 1组, 2组, 3组, 便于remove时,按组进行清理
121
+ * cmdPackList中是新的由 action(), state(), condition(), (actorState)=>{} 组成的指令集
122
+ * 其中(actorState)=>{} condition().xxxx.then() 中独有的指令类型, 用于对接此condition触发后, 进行js端的回调
123
+ * actorState {
124
+ * xPos: number, // 当前drawX的值
125
+ * yPos: number, // 当前drawY的值
126
+ * xSpd: number, // 当前SpeedX的值
127
+ * ySpd: number, // 当前SpeedY的值
128
+ * xAcc: number, // 当前AccelerationX的值
129
+ * yAcc: number, // 当前AccelerationY的值
130
+ * }
131
+ *
132
+ * 创建condition时, 会记录当时的 baseOffset 坐标, 其设定值在进行比较时会转换成baseX和baseY坐标, 然后进行比较
133
+ * 所以不同担心div的style.top, style.left改变后, condition设置的条件中的坐标会发生偏移导致需要重新设置
134
+ * 比如: wallPosition(), boxPosition() 这种要常驻的condition
135
+ *
136
+ * boxPosition 用法示例(边界框与背景div尺寸一致):
137
+ * // div1 背景: (0, 0) -> (400, 400)
138
+ * cmds.condition({ multiTimes: true })
139
+ * .boxPosition(0, 0, 400, 400)
140
+ * .then([cmds.action().stopMoving(true)]);
141
+ *
142
+ * // div2 背景: (0, 0) -> (200, 200)
143
+ * cmds.condition({ multiTimes: true })
144
+ * .boxPosition(0, 0, 200, 200)
145
+ * .then([cmds.action().stopMoving(true)]);
146
+ *
147
+ * condition创建时, 可以用group和specName进行归类, 以便于后续按需清理, 例如:
148
+ * wallPosition()在一启动的时候有, 后续就没有了, 而还有其他condition存在, 不能使用state().clearConditions()全清理
149
+ *
150
+ * action指令内部也可能自己创建一些associated condition, 这些condition会被action执行完成后自动回收, 不需要通过state指令主动清理
151
+ *
152
+ * 可用方法见 @file://./SetCondition.ts
153
+ * @param {int | ConditionConfig} configOrGroup 可选参数,默认为0, 有效值为0~3, 对应默认组, 1组, 2组, 3组, 便于remove时,按组进行清理, 单个Anim中唯一, Anim之间可重名
154
+ * 也可以传入一个Object, 包含 group, multiTimes, specName, shoudRenderBreak 四个属性
43
155
  * @param {boolean} multiTimes 可选参数,默认为false, 是否要多次执行,
44
156
  * 若为单次, 当group未设定时自动作废,当group设定时,不作废但改为deactive状态
45
- * @param {string} specName 可选参数,默认null, 命名condition, 用于指定名字进行active/deactive动作的场景
157
+ * @param {string} specName 可选参数,默认null, 命名condition, 单个Anim中唯一, Anim之间可重名, 用于指定名字进行active/deactive动作的场景
46
158
  * @param {boolean} shoudRenderBreak 可选参数,默认false, 关联的回调是否会发起RenderBreak
47
- * @return {ConditionPackBuilder} ConditionPack 的工厂对象
159
+ * @return {ConditionPackBuilder} Condition指令的工厂对象
48
160
  */
49
161
  condition(
50
- group: number = 0,
51
- multiTimes: boolean = false,
52
- specName: string | null = null,
53
- shoudRenderBreak: boolean = false
162
+ configOrGroup?: ConditionConfig | number,
163
+ multiTimes?: boolean,
164
+ specName?: string | null,
165
+ shoudRenderBreak?: boolean
54
166
  ): ConditionPackBuilder {
167
+ let _group: number = 0;
168
+ let _multiTimes: boolean = false;
169
+ let _specName: string | null = null;
170
+ let _shoudRenderBreak: boolean = false;
171
+
172
+ if (typeof configOrGroup === 'object') {
173
+ _group = (configOrGroup as ConditionConfig).group || 0;
174
+ _multiTimes = (configOrGroup as ConditionConfig).multiTimes || false;
175
+ _specName = (configOrGroup as ConditionConfig).specName || null;
176
+ _shoudRenderBreak = (configOrGroup as ConditionConfig).shoudRenderBreak || false;
177
+ } else {
178
+ _group = configOrGroup ?? 0;
179
+ _multiTimes = multiTimes ?? false;
180
+ _specName = specName ?? null;
181
+ _shoudRenderBreak = shoudRenderBreak ?? false;
182
+ }
183
+
55
184
  // 注意: 不支持获取condition后,多次复制
56
185
  let builder: ConditionPackBuilder = this._SharedQuickConditionPackBuilder;
57
186
  if (builder.isInUsing()) {
58
187
  // 用于加速的builder被占用了,为了防止状态问题,使用新建builder
59
188
  builder = new ConditionPackBuilder(this._Callbacks, this._SelfNexusRecv, this);
60
189
  }
61
- builder.updateCommandInfo(group, multiTimes, specName, shoudRenderBreak);
190
+ builder.updateCommandInfo(_group, _multiTimes, _specName, _shoudRenderBreak);
62
191
  return builder;
63
192
  }
64
193
 
65
194
  /**
66
195
  * Action
67
- * 获取创建 ActionPack 的工厂对象
68
- * 注意: ActionPack 是指会改变 speed 或 accelerate 并自动生成子condition的指令,
69
- * 每个新的Action会覆盖掉前一次的Action设置,包括其关联的condition,
70
- * 以及上一个action中的回调,以及上一个action中规划中的ActionEvent
71
- * 可用方法见 ./SetAction.js
196
+ * 获取创建 Action指令 的工厂对象
72
197
  *
73
- * @param {int} xySpeedKeeps xy轴上的速度是否保持(与新Action不冲突的才会被保留),
198
+ * 用法示例:
199
+ * actorControl.run((cmds)=>[ // cmds: 即为 BuilderFactory 的实例
200
+ * cmds.action(...).动作指令(...), // 动作指令: 例如 teleportOffset()
201
+ * ... // 其他command
202
+ * ]);
203
+ *
204
+ * Action主要是改变speed和accelerate的值,在Action指令中还包含一些综合指令, 例如:
205
+ * brakeToPosition: 通过内部创建一些associated condition来实现减速并停止到目标位置
206
+ * setSpdAndAccel: 同时设置速度和加速度,并提供拐点回调(用于抛物线处理)
207
+ *
208
+ * Action有个重要个规则: 一个FreeMoveActor中, 一个时间只会激活一条Action指令,
209
+ * 当下一条Action指令激活时, 会默认自动重置因为上一条Action而改变的SpeedX/Y(重置为0), AccelerationX/Y(重置为0), 以及其associated condition
210
+ * 但也可以进行主动保持, 通过 xySpeedKeeps 和 xyAccKeeps 参数控制
211
+ *
212
+ * 可用方法见 @file://./SetAction.ts
213
+ *
214
+ * @param {int | ActionConfig} configOrSpeedKeeps xy轴上的速度是否保持(与新Action不冲突的才会被保留),
74
215
  * x轴保持为1, y轴保持为2,可"与或"让两个轴都保持
216
+ * 也可以传入一个Object, 包含 xySpeedKeeps, xyAccKeeps, nexusRecv 三个属性
75
217
  * @param {int} xyAccKeeps xy轴上的加速度是否保持(与新Action不冲突的才会被保留),
76
218
  * x轴保持为1, y轴保持为2,可"与或"让两个轴都保持
77
219
  * @param {NexusNode} nexusRecv 此动作发出的 nexusEvent 的接受者
78
- * @return {ActionPackBuilder} ActionPack 的工厂对象
220
+ * @return {ActionPackBuilder} Action指令的工厂对象
79
221
  */
80
222
  action(
81
- xySpeedKeeps: number = 0,
82
- xyAccKeeps: number = 0,
83
- nexusRecv: NexusNode | null = null
223
+ configOrSpeedKeeps?: ActionConfig | number,
224
+ xyAccKeeps?: number,
225
+ nexusRecv?: NexusNode
84
226
  ): ActionPackBuilder {
227
+ let _xySpeedKeeps: number = 0;
228
+ let _xyAccKeeps: number = 0;
229
+ let _nexusRecv: NexusNode | null = null;
230
+
231
+ if (typeof configOrSpeedKeeps === 'object') {
232
+ _xySpeedKeeps = (configOrSpeedKeeps as ActionConfig).xySpeedKeeps || 0;
233
+ _xyAccKeeps = (configOrSpeedKeeps as ActionConfig).xyAccKeeps || 0;
234
+ _nexusRecv = (configOrSpeedKeeps as ActionConfig).nexusRecv || null;
235
+ } else {
236
+ _xySpeedKeeps = configOrSpeedKeeps ?? 0;
237
+ _xyAccKeeps = xyAccKeeps ?? 0;
238
+ _nexusRecv = nexusRecv ?? null;
239
+ }
240
+
85
241
  let builder: ActionPackBuilder = this._SharedQuickActionPackBuilder;
86
242
  if (builder.isInUsing()) {
87
243
  // 用于加速的builder被占用了,为了防止状态问题,使用新建builder
88
244
  builder = new ActionPackBuilder(this._Callbacks, this._SelfNexusRecv);
89
245
  }
90
- builder.updateCommonInfo(xySpeedKeeps, xyAccKeeps, nexusRecv);
246
+ builder.updateCommonInfo(_xySpeedKeeps, _xyAccKeeps, _nexusRecv);
91
247
  return builder;
92
248
  }
93
249
 
94
250
  /**
95
251
  * State
96
- * 获取创建 StatePack 的工厂对象
252
+ * 获取创建 State指令 的工厂对象
253
+ *
254
+ * 用法示例:
255
+ * actorControl.run((cmds)=>[ // cmds: 即为 BuilderFactory 的实例
256
+ * cmds.state(...).状态指令(...), // 状态指令: 例如 clearConditions()
257
+ * ... // 其他command
258
+ * ]);
259
+ *
97
260
  * 在下一帧运行前的设置值,例如清理condition, 或者在下一帧运动的前调整启动运动的位置
98
- * 可用方法见 ./SetState.js
99
- * @return {StatePackBuilder} StatePack 的工厂对象
261
+ * 可用方法见 @file://./SetState.ts
262
+ * @return {StatePackBuilder} State指令的工厂对象
100
263
  */
101
264
  state(): StatePackBuilder {
102
265
  return this._StatePackBuilder;
@@ -122,6 +285,11 @@ class ActorControl {
122
285
  this._Builders = new BuilderFactory(this, this._Callbacks, this._SelfNexusRecv);
123
286
  }
124
287
 
288
+ /**
289
+ * 内部API
290
+ *
291
+ * asSizeMode
292
+ */
125
293
  asSizeMode() {
126
294
  if (this._BindAnim != null) {
127
295
  console.error("error: asSizeMode should call before bindForgeView");
@@ -134,6 +302,15 @@ class ActorControl {
134
302
  // return this._BindAnim?.AnimNativeId;
135
303
  // }
136
304
 
305
+ /**
306
+ * 内部API
307
+ *
308
+ * bindForgeView
309
+ * 为普通的div创建ActorControl控制
310
+ *
311
+ * @param {any} bindView forgeView实例
312
+ * @param {boolean} instantActive 是否立即激活动画
313
+ */
137
314
  bindForgeView(bindView: any, instantActive: boolean) {
138
315
  this._BindView = bindView;
139
316
 
@@ -143,7 +320,26 @@ class ActorControl {
143
320
  }
144
321
 
145
322
  /**
146
- * run 执行编排好的intent集合
323
+ * run 创建并执行编排好的指令队列
324
+ *
325
+ * 用法为
326
+ * actorControl.run((cmds)=>[ // 指令队列
327
+ * cmds.state(...).状态指令(...),
328
+ * cmds.action(...).动作指令(...),
329
+ * cmds.condition(...).条件指令(...).then([
330
+ * // 条件满足时预设的指令集队列
331
+ * cmds.condition(...).其他条件指令(...),
332
+ * (actorState)=>{
333
+ * console.log(
334
+ * "condition triggered",
335
+ * actorState.xPos, actorState.yPos,
336
+ * actorState.xSpd, actorState.ySpd,
337
+ * actorState.xAcc, actorState.yAcc);
338
+ * },
339
+ * ...
340
+ * ]),
341
+ * ...
342
+ * ]);
147
343
  *
148
344
  * @param {CmdListCreator} commandsCreator
149
345
  * 命令指令队列创建回调
@@ -176,11 +372,21 @@ class ActorControl {
176
372
  RunFreeMoveCmdPacks(this._BindView, cmdPackList);
177
373
  }
178
374
 
375
+ /**
376
+ * 内部API
377
+ *
378
+ * getBindedAnim
379
+ */
179
380
  getBindedAnim() {
180
381
  this._EnsureAnim();
181
382
  return this._BindAnim;
182
383
  }
183
384
 
385
+ /**
386
+ * 内部API
387
+ *
388
+ * getBindedView
389
+ */
184
390
  getBindedView() {
185
391
  this._EnsureAnim();
186
392
  return this._BindView;
@@ -190,6 +396,9 @@ class ActorControl {
190
396
  * addCondCycleListener
191
397
  * 追加 cond cycle listener,可以根据start和end来进行callback时序排序
192
398
  *
399
+ * 应对场景为, 在condition的 (ActorState)=>{} 回调中,
400
+ * 当一帧中condition的多个回调发生时(可能复数的condition被触发,也可能是一个condition有多个回调), 协调这些回调的处理逻辑的场景
401
+ *
193
402
  * @param {Function} startCycleCallback 开始执行一帧的js回调(condition的callback)
194
403
  * @param {Function} endCycleCallback 执行一帧的js回调完毕
195
404
  */
@@ -209,6 +418,13 @@ class ActorControl {
209
418
  }
210
419
  }
211
420
 
421
+ /**
422
+ * removeCondCycleListener
423
+ * 移除由 addCondCycleListener 加入的回调
424
+ *
425
+ * @param {Function} startCycleCallback 开始执行一帧的js回调(condition的callback)
426
+ * @param {Function} endCycleCallback 执行一帧的js回调完毕
427
+ */
212
428
  removeCondCycleListener(startCycleCallback: Function, endCycleCallback: Function) {
213
429
  if (startCycleCallback && this._CondCycleStartList) {
214
430
  for (let i = 0; i < this._CondCycleStartList.length; i++) {
@@ -232,6 +448,7 @@ class ActorControl {
232
448
  // 遇到layout后仍然会因为新broadcast有动作时,一帧中可能会有多次回调
233
449
  let retJsonObject: any = JSON.parse(retJson);
234
450
  let echoRetList: Array<any> = retJsonObject["retList"];
451
+ delete retJsonObject["retList"]; // 删除retList, 避免回调中读取
235
452
  if (echoRetList) {
236
453
  if (this._CondCycleStartList && this._CondCycleStartList.length > 0) {
237
454
  for (let startCb of this._CondCycleStartList) {
@@ -23,7 +23,7 @@
23
23
  * sizeMode: Boolean, 从控制div左上角坐标的模式改为改为通过div矩形宽高
24
24
  * (指令控制右下角坐标,实现对[0,0]->[右下角x,y]的矩形的宽高调整,另外,不支持负坐标)
25
25
  * expose说明:
26
- * control: Object 控制器句柄,具体参考 ActorControl
26
+ * control: ActorControl ActorControl实例,详细使用规则见 @file://./ActorControl.ts
27
27
  -->
28
28
  <script setup>
29
29
  import ActControl from "./ActorControl.ts";
@@ -193,6 +193,7 @@ class ActorPackBuilder {
193
193
  * @param {double} ySpeed 运行速度,使用时会自动取绝对值,单位(pixel/帧)
194
194
  * undefined时,若targetY设置, 则把edge作为运动目标,以另一轴速度反推此速度, 否则不改变该轴速度
195
195
  * @param {function} endCallback 参数(x, y) 运动到目标位置后的回调函数, x或者y达到后即回调,以先到为准,回报当前Actor的相对于原始位置的x,y
196
+ * 是通过condition().then([(ActorState)=>{}])实现
196
197
  * @return CommandPack(放入run或者then的CmdPackList队列)
197
198
  */
198
199
  public moveTo(
@@ -249,6 +250,7 @@ class ActorPackBuilder {
249
250
  * ySpeed (double) 带符号整数,符号表示方向,标识运动的运行速度,单位(pixel/帧), 可设undefined代表不改变该轴速度
250
251
  * spreadFrame (int) 选填,正整数, 变速需要经历帧数, 若为立即变速,则设置为0,或者不再设置(undefined)
251
252
  * finishCallback (Function(xSpeed, ySpeed)) 选填,达到目标速度后的回调,当costTime不为0时有效
253
+ * 是通过condition().then([(ActorState)=>{}])实现
252
254
  */
253
255
  altSpeed(
254
256
  xSpeed: number | undefined,
@@ -300,7 +302,9 @@ class ActorPackBuilder {
300
302
  * targetX (int) 带符号整数,目标运动终点位置,如果设置为undefined,标识不以此轴为终点
301
303
  * targetY (int) 带符号整数,目标运动终点位置,如果设置为undefined,标识不以此轴为终点
302
304
  * finishCallback (Function(x,y)) 运动到目标位置后的回调函数, x或者y达到后即回调,以先到为准,回报当前Actor的相对于原始位置的x,y
305
+ * 是通过condition().then([(ActorState)=>{}])实现
303
306
  * rejectedCallback (Function()) 当前速度无法达到target位置时,回调此函数,然后放弃改变任何速度和加速度
307
+ * 是通过condition().then([(ActorState)=>{}])实现
304
308
  */
305
309
  brakeToPosition(
306
310
  targetX: number | undefined,
@@ -420,7 +424,7 @@ class ActorPackBuilder {
420
424
  return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
421
425
  }
422
426
 
423
- /*
427
+ /**
424
428
  * setSpdAndAccel
425
429
  * 同时设置速度和加速度,并提供拐点回调(用于抛物线处理)
426
430
  *
@@ -429,8 +433,8 @@ class ActorPackBuilder {
429
433
  * spdY (double) y 速度有效值,可正可负, 每帧的posY移动量, 可以传入undefined来决定此值不设置
430
434
  * accelX (double) 加速度有效值,可正可负,每帧spdX的调整量,可以传入undefined来决定此值不设置
431
435
  * accelY (double) 加速度有效值,可正可负,每帧spdY的调整量,可以传入undefined来决定此值不设置
432
- * onRevertX (function) x速度开始反向运动时,进行回调(例如抛物到达顶点)
433
- * onRevertY (function) y速度开始反向运动时,进行回调(例如抛物到达顶点)
436
+ * onRevertX (function) x速度开始反向运动时,进行js回调(例如抛物到达顶点, 是通过condition().then([(ActorState)=>{}])实现)
437
+ * onRevertY (function) y速度开始反向运动时,进行js回调(例如抛物到达顶点, 是通过condition().then([(ActorState)=>{}])实现)
434
438
  */
435
439
  setSpdAndAccel(
436
440
  spdX: number | undefined,
@@ -461,10 +465,12 @@ class ActorPackBuilder {
461
465
  return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
462
466
  }
463
467
 
464
- /*
468
+ /**
465
469
  * stopMoving
466
470
  * 停止运动
467
- * isExact (boolean) 设置为true时, 如果在positionCondition中会按照condition的位置进行精准停止
471
+ * isExact (boolean) 设置为true时,
472
+ * 如果在positionCondition中会按照condition的位置进行精准停止
473
+ * 从而解决在condition.then中停止时,停止的位置因为上帧的drawX/Y + speedX/Y并不是完全和condition不吻合,而希望吻合的问题
468
474
  */
469
475
  stopMoving(
470
476
  isExact: boolean = true