@shijiu/jsview-vue 2.3.151-test.0 → 2.3.728-alpha.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.
- package/bin/browser/BrowserJsvLatex.vue.mjs +9 -90
- package/bin/jsview-vue.mjs +5964 -1833
- package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +18 -2
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +225 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +225 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetDebugger.d.ts +5 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +25 -2
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +7 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +25 -5
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +2 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/Utils.d.ts +2 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +1 -1
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue.d.ts +70 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.d.ts +24 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.d.ts +19 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.d.ts +42 -0
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +3 -3
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +2 -1
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +12 -4
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +9 -7
- package/bin/types/utils/JsViewEngineWidget/WidgetCommon.d.ts +17 -7
- package/bin/types/utils/JsViewEngineWidget/index.d.ts +3 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +0 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/GetVersion.d.ts +14 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +3 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +1 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +4 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +29 -2
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +107 -4
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +62 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +94 -18
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-wasm.vue.d.ts +611 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue.d.ts → JsvPlayerBrowser.vue.d.ts} +24 -23
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +77 -20
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +77 -20
- package/bin/types/utils/JsViewVueTools/BlobApi.d.ts +38 -0
- package/bin/types/utils/JsViewVueTools/FeatureActive.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvInteractionMode.d.ts +6 -0
- package/bin/types/utils/JsViewVueTools/JsvRuntimeBridge.d.ts +10 -3
- package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.d.ts +43 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.d.ts +54 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +13 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +2 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +76 -26
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.d.ts +49 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/index.d.ts +2 -0
- package/bin/types/utils/JsViewVueTools/index.d.ts +3 -1
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +12 -22
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +12 -22
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/JsViewHtmlToVNodesOptions.d.ts +101 -0
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/JsvDomRenderer.d.ts +61 -0
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/htmlToVNodes.d.ts +58 -0
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/index.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +151 -18
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +2 -1
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/CmdTypes.d.ts +16 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +2 -1
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.d.ts +3 -1
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +55 -12
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +178 -35
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +119 -17
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +9 -3
- package/bin/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +4 -1
- package/bin/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +22 -1
- package/bin/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +1 -1
- package/bin/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +2 -0
- package/bin/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +5 -2
- package/bin/types/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +1 -1
- package/bin/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +39 -1
- package/bin/types/utils/JsViewVueWidget/JsvSector.vue.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvTextBox.vue.d.ts +15 -3
- package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +22 -96
- package/bin/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +6 -0
- package/bin/types/utils/JsViewVueWidget/{JsvPosterDiv.vue.d.ts → TypesDiv/JsvPosterDiv.vue.d.ts} +9 -0
- package/bin/types/utils/JsViewVueWidget/{JsvPosterImage.vue.d.ts → TypesDiv/JsvPosterImage.vue.d.ts} +15 -3
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue.d.ts +72 -0
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue.d.ts +90 -0
- package/bin/types/utils/JsViewVueWidget/index.d.ts +6 -3
- package/dist/types/utils/JsViewEngineWidget/CheckType.d.ts +7 -0
- package/dist/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +106 -0
- package/dist/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +128 -0
- package/dist/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +25 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Const.d.ts +23 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/DebugFrame.vue.d.ts +12 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/DebugTools.d.ts +9 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +16 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +412 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +751 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetDebugger.d.ts +9 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +82 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +31 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +80 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Slide.d.ts +25 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +52 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +69 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/TokenGenerator.d.ts +4 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Utils.d.ts +6 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/VisibleInfo.d.ts +20 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +21 -0
- package/dist/types/utils/JsViewEngineWidget/RangeModel.d.ts +166 -0
- package/dist/types/utils/JsViewEngineWidget/RectUtils.d.ts +61 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue.d.ts +74 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.d.ts +28 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.d.ts +23 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.d.ts +46 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +42 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/Fence.d.ts +62 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +21 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +103 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +28 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/index.d.ts +8 -0
- package/dist/types/utils/JsViewEngineWidget/WidgetCommon.d.ts +160 -0
- package/dist/types/utils/JsViewEngineWidget/index.d.ts +21 -0
- package/dist/types/utils/JsViewPlugin/JsvAccount/JsvAccount.d.ts +46 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/AudioProxy.d.ts +6 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +22 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +212 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/CheckType.d.ts +6 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/Events.d.ts +17 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +22 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.d.ts +12 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +6 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/PluginLoader.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/ScreenLockManager.d.ts +9 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/index.d.ts +7 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/version.d.mts +14 -0
- package/{bin/types/utils/JsViewPlugin/JsvLatex → dist/types/utils/JsViewPlugin/JsvAudio}/version.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +0 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +17 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/Color.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/GetVersion.d.ts +18 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +46 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +8 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +9 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/PluginLoader.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/index.d.ts +8 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/version.d.mts +40 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/AckEventDefine.d.ts +10 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/GetVersion.d.ts +13 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +523 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +119 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +664 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-0.9.vue.d.ts +45 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-wasm.vue.d.ts +611 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue.d.ts +597 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +415 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +415 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +14 -0
- package/dist/types/utils/JsViewPlugin/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueTools/BlobApi.d.ts +42 -0
- package/dist/types/utils/JsViewVueTools/ConstSymbol.d.ts +6 -0
- package/dist/types/utils/JsViewVueTools/DebugContentShellJBridge.d.ts +10 -0
- package/dist/types/utils/JsViewVueTools/DebugTool.d.ts +12 -0
- package/dist/types/utils/JsViewVueTools/DefaultKeyMap.d.ts +14 -0
- package/dist/types/utils/JsViewVueTools/FeatureActive.d.ts +15 -0
- package/dist/types/utils/JsViewVueTools/ForgeConstDefine.d.ts +15 -0
- package/dist/types/utils/JsViewVueTools/ForgeHandles.d.ts +11 -0
- package/dist/types/utils/JsViewVueTools/JsvDynamicCssStyle.d.ts +33 -0
- package/dist/types/utils/JsViewVueTools/JsvDynamicKeyFrames.d.ts +40 -0
- package/dist/types/utils/JsViewVueTools/JsvFederationTools.d.ts +20 -0
- package/dist/types/utils/JsViewVueTools/JsvHashHistory.d.ts +20 -0
- package/dist/types/utils/JsViewVueTools/JsvImpactTracer.d.ts +44 -0
- package/dist/types/utils/JsViewVueTools/JsvInteractionMode.d.ts +10 -0
- package/dist/types/utils/JsViewVueTools/JsvPerformance.d.ts +9 -0
- package/dist/types/utils/JsViewVueTools/JsvPreDownloader.d.ts +55 -0
- package/dist/types/utils/JsViewVueTools/JsvRefTaker.d.ts +52 -0
- package/dist/types/utils/JsViewVueTools/JsvRuntimeBridge.d.ts +378 -0
- package/dist/types/utils/JsViewVueTools/JsvStyleClass.d.ts +35 -0
- package/dist/types/utils/JsViewVueTools/JsvStyleSheetsDeclarer.d.ts +35 -0
- package/dist/types/utils/JsViewVueTools/JsvTextTools.d.ts +66 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureDefines.d.ts +10 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureLoadTool.d.ts +67 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.d.ts +47 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +99 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +20 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.d.ts +58 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +113 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +17 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +170 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/Store.d.ts +16 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/Texture.d.ts +31 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.d.ts +53 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueTools/NinePatchHelper.d.ts +25 -0
- package/dist/types/utils/JsViewVueTools/TextureManagerTools.d.ts +11 -0
- package/dist/types/utils/JsViewVueTools/TypeCheckAndSet.d.ts +7 -0
- package/dist/types/utils/JsViewVueTools/index.d.ts +29 -0
- package/dist/types/utils/JsViewVueWidget/Jsv3dDiv.vue.d.ts +124 -0
- package/dist/types/utils/JsViewVueWidget/Jsv3dStage.vue.d.ts +148 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/ActorControlBase.d.ts +35 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +102 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.d.ts +37 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +15 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +77 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +54 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +13 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +44 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +17 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +13 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +3 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/GifData.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +12 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +20 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/WebpData.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +26 -0
- package/dist/types/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +74 -0
- package/dist/types/utils/JsViewVueWidget/JsvClipDiv/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +34 -0
- package/dist/types/utils/JsViewVueWidget/JsvConnectLine/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvDashPath.vue.d.ts +33 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/JsViewHtmlToVNodesOptions.d.ts +105 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/JsvDomRenderer.d.ts +65 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/htmlToVNodes.d.ts +62 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +109 -0
- package/dist/types/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +108 -0
- package/dist/types/utils/JsViewVueWidget/JsvDriftScope/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +61 -0
- package/dist/types/utils/JsViewVueWidget/JsvFilterView.vue.d.ts +91 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +106 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/JsvFullScrAdjust.vue.d.ts +100 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +108 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +63 -0
- package/dist/types/utils/JsViewVueWidget/JsvFragShaderView/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActionRefObject.d.ts +4 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +228 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorState.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/CmdTypes.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +20 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +106 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvFreeMoveActor.vue.d.ts +107 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/KeepFlags.d.ts +11 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.d.ts +12 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +118 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +244 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +169 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +22 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +24 -0
- package/dist/types/utils/JsViewVueWidget/JsvGrid.vue.d.ts +241 -0
- package/dist/types/utils/JsViewVueWidget/JsvHole.d.ts +19 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +52 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +30 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +98 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/SharedDefine.d.ts +17 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +20 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +32 -0
- package/dist/types/utils/JsViewVueWidget/JsvLine/LineManager.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvLine/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvMarquee.vue.d.ts +33 -0
- package/dist/types/utils/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +101 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/CommonType.d.ts +1 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/Constant.d.ts +13 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/DataTree.d.ts +75 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/Geometry.d.ts +72 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +235 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/rtree.d.ts +44 -0
- package/dist/types/utils/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +93 -0
- package/dist/types/utils/JsViewVueWidget/JsvNinePatch.vue.d.ts +55 -0
- package/dist/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +30 -0
- package/dist/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +68 -0
- package/dist/types/utils/JsViewVueWidget/JsvPreload/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvProgressBar.vue.d.ts +31 -0
- package/dist/types/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +85 -0
- package/dist/types/utils/JsViewVueWidget/JsvRadarChart.vue.d.ts +37 -0
- package/dist/types/utils/JsViewVueWidget/JsvRipple/Constant.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +129 -0
- package/dist/types/utils/JsViewVueWidget/JsvRipple/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +28 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +278 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +157 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvSector.vue.d.ts +30 -0
- package/dist/types/utils/JsViewVueWidget/JsvSmoothSlideContainer.vue.d.ts +76 -0
- package/dist/types/utils/JsViewVueWidget/JsvSoundPool.d.ts +114 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +58 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.d.ts +18 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +70 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +85 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteTools.d.ts +15 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/SpriteController.d.ts +21 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/index.d.ts +9 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/JsvSmoothSwiper.vue.d.ts +141 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +248 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper2.vue.d.ts +181 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +121 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper3D/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextBox.vue.d.ts +121 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextureAnim/CommonType.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +38 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextureAnim/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +109 -0
- package/dist/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +23 -0
- package/dist/types/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +109 -0
- package/dist/types/utils/JsViewVueWidget/JsvVisibleSensor/index.d.ts +88 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue.d.ts +94 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue.d.ts +115 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue.d.ts +94 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue.d.ts +115 -0
- package/dist/types/utils/JsViewVueWidget/index.d.ts +53 -0
- package/dist/types/utils/index.d.ts +8 -0
- package/dist/utils/browser/BrowserAudio.vue.mjs +258 -0
- package/dist/utils/browser/BrowserJsvLatex.vue.mjs +64 -0
- package/dist/utils/export-sfc.mjs +12 -0
- package/dist/utils/index.mjs +29000 -0
- package/dist/utils/jsview-vue-common.mjs +39 -0
- package/package.json +1 -1
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +32 -16
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.ts +24 -2
- package/utils/JsViewEngineWidget/MetroWidget/Const.ts +5 -0
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +193 -89
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +325 -155
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetDebugger.ts +15 -0
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +1035 -370
- package/utils/JsViewEngineWidget/MetroWidget/PageUpdater.ts +41 -23
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +138 -41
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +1 -0
- package/utils/JsViewEngineWidget/MetroWidget/Utils.ts +6 -0
- package/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.ts +2 -1
- package/utils/JsViewEngineWidget/RectUtils.js +1 -1
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue +62 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.ts +260 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.ts +32 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.ts +236 -0
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +329 -230
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +101 -27
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +54 -5
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +109 -41
- package/utils/JsViewEngineWidget/WidgetCommon.ts +17 -7
- package/utils/JsViewEngineWidget/index.ts +7 -2
- package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +46 -46
- package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +54 -41
- package/utils/JsViewPlugin/JsvLatex/Color.ts +104 -39
- package/utils/JsViewPlugin/JsvLatex/GetVersion.js +65 -0
- package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +71 -17
- package/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.js +10 -0
- package/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue +14 -2
- package/utils/JsViewPlugin/JsvLatex/PluginLoader.js +63 -31
- package/utils/JsViewPlugin/JsvLatex/version.mjs +26 -13
- package/utils/JsViewPlugin/JsvPlayer/GetVersion.js +2 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +402 -23
- package/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.js +100 -0
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +363 -468
- package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue → JsvPlayerBrowser-wasm.vue} +60 -10
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue +511 -0
- package/utils/JsViewPlugin/JsvPlayer/index-0.9.js +52 -10
- package/utils/JsViewPlugin/JsvPlayer/index.js +58 -9
- package/utils/JsViewPlugin/JsvPlayer/package.json +8 -0
- package/utils/JsViewVueTools/BlobApi.ts +55 -0
- package/utils/JsViewVueTools/FeatureActive.ts +3 -0
- package/utils/JsViewVueTools/ForgeHandles.ts +3 -0
- package/utils/JsViewVueTools/JsvInteractionMode.js +16 -0
- package/utils/JsViewVueTools/JsvPreDownloader.ts +2 -2
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +40 -19
- package/utils/JsViewVueTools/JsvTextTools.ts +9 -1
- package/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.ts +180 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.ts +1 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.ts +304 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.ts +38 -0
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +16 -1
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +154 -69
- package/utils/JsViewVueTools/JsvTextureStore/Store.ts +1 -1
- package/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.ts +92 -0
- package/utils/JsViewVueTools/JsvTextureStore/index.js +2 -0
- package/utils/JsViewVueTools/index.js +3 -1
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +111 -86
- package/utils/JsViewVueWidget/JsvDomRenderer/JsViewHtmlToVNodesOptions.ts +212 -0
- package/utils/JsViewVueWidget/JsvDomRenderer/JsvDomRenderer.ts +146 -0
- package/utils/JsViewVueWidget/JsvDomRenderer/htmlToVNodes.ts +748 -0
- package/utils/JsViewVueWidget/JsvDomRenderer/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +10 -1
- package/utils/JsViewVueWidget/JsvEnableRenderBreak.vue +6 -0
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +11 -5
- package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +3 -1
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +23 -11
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +269 -26
- package/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.ts +2 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/CmdTypes.ts +24 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.ts +3 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/{FreeMoveActor.vue → JsvFreeMoveActor.vue} +5 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.ts +10 -2
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +223 -100
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +245 -64
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +95 -29
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +27 -5
- package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +11 -2
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +29 -2
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +24 -7
- package/utils/JsViewVueWidget/JsvMarquee.vue +1 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +12 -10
- package/utils/JsViewVueWidget/JsvNinePatch.vue +22 -12
- package/utils/JsViewVueWidget/JsvPieChart.vue +93 -70
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +32 -29
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +2 -1
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +56 -25
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +11 -11
- package/utils/JsViewVueWidget/JsvSector.vue +66 -28
- package/utils/JsViewVueWidget/JsvTextBox.vue +30 -1
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +315 -305
- package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +56 -14
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +8 -6
- package/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue +54 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue +88 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue +177 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue +267 -0
- package/utils/JsViewVueWidget/index.js +7 -2
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/DominantColor/GetDominantColor.d.ts +0 -7
- package/utils/JsViewPlugin/JsvLatex/version.js +0 -24
- package/utils/JsViewVueTools/JsvTextureStore/DominantColor/GetDominantColor.ts +0 -36
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +0 -56
- package/utils/JsViewVueWidget/JsvPosterImage.vue +0 -105
- /package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue.d.ts → JsvPlayerBrowser-0.9.vue.d.ts} +0 -0
- /package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/{FreeMoveActor.vue.d.ts → JsvFreeMoveActor.vue.d.ts} +0 -0
- /package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue → JsvPlayerBrowser-0.9.vue} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { FireGlobalNexus } from "./ForgeTypeDefine"
|
|
2
2
|
let sNexusIdGen = 0x4000_0000; // 预留0为无效值
|
|
3
3
|
|
|
4
4
|
//js端预留的id范围为 0x40000000-0x7FFFFFFF
|
|
@@ -15,7 +15,15 @@ function newNexus(): NexusNode {
|
|
|
15
15
|
return new NexusNode();
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
function fireGlobalNexus(NexusNode: NexusNode) {
|
|
19
|
+
FireGlobalNexus(NexusNode.token, GLOBAL_CUSTOM_NEXUS_DETAIL_TYPE);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const GLOBAL_CUSTOM_NEXUS_DETAIL_TYPE = 1001;
|
|
23
|
+
|
|
18
24
|
export {
|
|
19
25
|
NexusNode,
|
|
20
|
-
|
|
26
|
+
GLOBAL_CUSTOM_NEXUS_DETAIL_TYPE,
|
|
27
|
+
newNexus,
|
|
28
|
+
fireGlobalNexus
|
|
21
29
|
}
|
|
@@ -9,96 +9,85 @@ import { ConditionSetBuilder, StateCmdBuilder, CmdPackBuilder, ActionCmdBuilder
|
|
|
9
9
|
import { ActEventDefine } from "./ForgeTypeDefine"
|
|
10
10
|
import { GroupType_ActionAssoc } from "./ForgeTypeDefine"
|
|
11
11
|
import CallbackManager from "./CallbackManager";
|
|
12
|
-
import ActionRefObject from "./ActionRefObject";
|
|
13
12
|
import ActorState from "./ActorState";
|
|
14
13
|
import { NexusNode } from "./NexusNode";
|
|
14
|
+
import type { CommandPackType, CommandType } from "./CmdTypes";
|
|
15
|
+
import { TranslateCondThenCmdPackList } from "./SetCondition";
|
|
15
16
|
|
|
16
17
|
const ConditionCmdCreator = (
|
|
17
|
-
builderThis: ActorPackBuilder,
|
|
18
18
|
setCondFunc: Function, // 条件创建处理
|
|
19
|
-
acts: Array<
|
|
19
|
+
acts: Array<CommandPackType | Function | null> | null, // 条件达成后的命令列表
|
|
20
20
|
isFinal: boolean, // 用于进行结束时清理临时condition
|
|
21
|
-
|
|
22
|
-
) => {
|
|
21
|
+
) : CommandType => {
|
|
23
22
|
let commonInfo = ConditionSetBuilder.InitCommonInfo();
|
|
24
23
|
ConditionSetBuilder.UpdateCommonInfo(commonInfo, GroupType_ActionAssoc);
|
|
25
24
|
|
|
26
25
|
// 创建位置条件
|
|
27
26
|
let conditionSet: Object = setCondFunc(commonInfo);;
|
|
28
27
|
|
|
29
|
-
let conditionSubCmds: Array<
|
|
30
|
-
|
|
31
|
-
// 设置达到条件后的callback
|
|
32
|
-
if (callback) {
|
|
33
|
-
// callback接受参数为({xPos, yPos, xSpd, ySpd, xAcc, yAcc})
|
|
34
|
-
conditionSubCmds.push(builderThis._CallbackManager.buildCallbackCmd(callback));
|
|
35
|
-
}
|
|
28
|
+
let conditionSubCmds: Array<CommandPackType | Function | null> = acts ? acts : [];
|
|
36
29
|
|
|
37
30
|
if (isFinal) {
|
|
38
31
|
// 结束时清理临时condition
|
|
39
|
-
conditionSubCmds.push(StateCmdBuilder.DelActionAssocCondition());
|
|
32
|
+
conditionSubCmds.push(CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.DelActionAssocCondition()));
|
|
40
33
|
}
|
|
41
34
|
|
|
42
35
|
// 挂载设置好的Sub command list
|
|
43
36
|
if (conditionSubCmds.length > 0) {
|
|
44
|
-
ConditionSetBuilder.
|
|
37
|
+
ConditionSetBuilder.SetCmdPackList(conditionSet, conditionSubCmds);
|
|
45
38
|
}
|
|
46
39
|
|
|
47
40
|
return StateCmdBuilder.NewCondition(conditionSet);
|
|
48
41
|
}
|
|
49
42
|
|
|
50
43
|
const ActOnNexusEvent = (
|
|
51
|
-
builderThis: ActorPackBuilder,
|
|
52
44
|
nexusId: number,
|
|
53
45
|
eventType: number,
|
|
54
|
-
acts: Array<
|
|
55
|
-
isFinal: boolean
|
|
56
|
-
|
|
57
|
-
return ConditionCmdCreator(builderThis, (commonInfo: Object) => {
|
|
46
|
+
acts: Array<CommandPackType | Function | null> | null,
|
|
47
|
+
isFinal: boolean): CommandType => {
|
|
48
|
+
return ConditionCmdCreator((commonInfo: Object) => {
|
|
58
49
|
return ConditionSetBuilder.OnNexusEvent(nexusId, eventType, commonInfo);
|
|
59
|
-
}, acts, isFinal
|
|
50
|
+
}, acts, isFinal)
|
|
60
51
|
}
|
|
61
52
|
|
|
62
53
|
const ActOnReachPosition = (
|
|
63
|
-
builderThis: ActorPackBuilder,
|
|
64
54
|
xPos: number | undefined,
|
|
65
55
|
yPos: number | undefined,
|
|
66
|
-
acts: Array<
|
|
56
|
+
acts: Array<CommandPackType | Function | null> | null,
|
|
67
57
|
isFinal: boolean,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return ConditionCmdCreator(builderThis, (commonInfo: Object) => {
|
|
58
|
+
): CommandType => {
|
|
59
|
+
return ConditionCmdCreator((commonInfo: Object) => {
|
|
71
60
|
return ConditionSetBuilder.ReachPosition(xPos, yPos, commonInfo);
|
|
72
|
-
}, acts, isFinal
|
|
61
|
+
}, acts, isFinal);
|
|
73
62
|
}
|
|
74
63
|
|
|
75
64
|
const ActOnGetToSpeed = (
|
|
76
|
-
builderThis: ActorPackBuilder,
|
|
77
65
|
xSpeed: number | undefined,
|
|
78
66
|
ySpeed: number | undefined,
|
|
79
|
-
acts: Array<
|
|
67
|
+
acts: Array<CommandPackType | Function | null> | null,
|
|
80
68
|
isFinal: boolean,
|
|
81
|
-
|
|
82
|
-
): Object => {
|
|
83
|
-
return ConditionCmdCreator(builderThis, (commonInfo: Object): Object => {
|
|
69
|
+
): CommandType => {
|
|
70
|
+
return ConditionCmdCreator((commonInfo: Object): Object => {
|
|
84
71
|
return ConditionSetBuilder.ReachSpeed(xSpeed, ySpeed, commonInfo);
|
|
85
|
-
}, acts, isFinal
|
|
72
|
+
}, acts, isFinal);
|
|
86
73
|
}
|
|
87
74
|
|
|
88
75
|
const ActOnGetAcrossSpeed = (
|
|
89
|
-
builderThis: ActorPackBuilder,
|
|
90
76
|
xSpeed: number | undefined,
|
|
91
77
|
ySpeed: number | undefined,
|
|
92
|
-
acts: Array<
|
|
78
|
+
acts: Array<CommandPackType | Function | null> | null,
|
|
93
79
|
isFinal: boolean,
|
|
94
|
-
|
|
95
|
-
): Object => {
|
|
96
|
-
return ConditionCmdCreator(builderThis, (commonInfo: Object): Object => {
|
|
80
|
+
): CommandType => {
|
|
81
|
+
return ConditionCmdCreator((commonInfo: Object): Object => {
|
|
97
82
|
return ConditionSetBuilder.AcrossSpeed(xSpeed, ySpeed, commonInfo);
|
|
98
|
-
}, acts, isFinal
|
|
83
|
+
}, acts, isFinal);
|
|
99
84
|
}
|
|
100
85
|
|
|
101
|
-
|
|
86
|
+
/**
|
|
87
|
+
* action().XXXXX 可用的API说明
|
|
88
|
+
* 标注"内部API"的API, 应用开发时一定!!不要使用, 因为后续版本可能调整导致失效
|
|
89
|
+
*/
|
|
90
|
+
class ActionPackBuilder {
|
|
102
91
|
public _CallbackManager: CallbackManager;
|
|
103
92
|
private _ActionTokenGen: number;
|
|
104
93
|
|
|
@@ -106,7 +95,7 @@ class ActorPackBuilder {
|
|
|
106
95
|
private _AccKeeps: number;
|
|
107
96
|
private _NexusRecv: NexusNode | null;
|
|
108
97
|
private _CommonInfoValid: boolean;
|
|
109
|
-
private
|
|
98
|
+
private _ContorlSelfNexus: NexusNode;
|
|
110
99
|
|
|
111
100
|
constructor(callbackManager: CallbackManager, selfNexus: NexusNode) {
|
|
112
101
|
this._CallbackManager = callbackManager;
|
|
@@ -118,7 +107,7 @@ class ActorPackBuilder {
|
|
|
118
107
|
this._AccKeeps = 0;
|
|
119
108
|
this._NexusRecv = null;
|
|
120
109
|
this._CommonInfoValid = false;
|
|
121
|
-
this.
|
|
110
|
+
this._ContorlSelfNexus = selfNexus;
|
|
122
111
|
}
|
|
123
112
|
|
|
124
113
|
isInUsing() {
|
|
@@ -192,7 +181,10 @@ class ActorPackBuilder {
|
|
|
192
181
|
* undefined时,若edgeX设置, 则把edge作为运动目标,以另一轴速度反推此速度, 否则不改变该轴速度
|
|
193
182
|
* @param {double} ySpeed 运行速度,使用时会自动取绝对值,单位(pixel/帧)
|
|
194
183
|
* undefined时,若targetY设置, 则把edge作为运动目标,以另一轴速度反推此速度, 否则不改变该轴速度
|
|
195
|
-
* @param {function} endCallback
|
|
184
|
+
* @param {function | Array} endCallback
|
|
185
|
+
* function: js消息通知(异步), 参数(x, y) 运动到目标位置后的回调函数, x或者y达到后即回调,以先到为准,
|
|
186
|
+
* 回报当前Actor的相对于原始位置的x,y
|
|
187
|
+
* Array: 命令集
|
|
196
188
|
* @return CommandPack(放入run或者then的CmdPackList队列)
|
|
197
189
|
*/
|
|
198
190
|
public moveTo(
|
|
@@ -200,7 +192,7 @@ class ActorPackBuilder {
|
|
|
200
192
|
edgeY: number | undefined,
|
|
201
193
|
xSpeed: number | undefined,
|
|
202
194
|
ySpeed: number | undefined,
|
|
203
|
-
endCallback: Function | null = null
|
|
195
|
+
endCallback: Function | Array<CommandPackType | Function> | null = null
|
|
204
196
|
) {
|
|
205
197
|
if (!this._BasicPreProcess("moveTo")) {
|
|
206
198
|
return;
|
|
@@ -221,18 +213,27 @@ class ActorPackBuilder {
|
|
|
221
213
|
// 设置运动速度
|
|
222
214
|
cmdList.push(ActionCmdBuilder.SetArrowSpeed(edgeX, edgeY, xSpeed, ySpeed));
|
|
223
215
|
|
|
216
|
+
// 统一 callback 入参:既支持 function,也支持 then 命令数组
|
|
217
|
+
let endCallbackCmdPackList = this._BuildCallbackCmdPackList(
|
|
218
|
+
endCallback,
|
|
219
|
+
(callback: Function, actorState: ActorState) => {
|
|
220
|
+
callback?.(actorState.xPos, actorState.yPos);
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
|
|
224
224
|
// 设置达到目标位置的condition
|
|
225
225
|
cmdList.push(
|
|
226
226
|
ActOnReachPosition(
|
|
227
|
-
this,
|
|
228
227
|
edgeX, edgeY,
|
|
229
|
-
[
|
|
230
|
-
|
|
228
|
+
[
|
|
229
|
+
CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.AlignPosition()),
|
|
230
|
+
CmdPackBuilder.InitStateCmdPack(ActionCmdBuilder.StopMoving()), // 不改keeps的action = state
|
|
231
|
+
this._NexusRecv ?
|
|
232
|
+
CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.FireNexusEvent(ActEventDefine.ActFinish, this._NexusRecv.token))
|
|
233
|
+
: null,
|
|
234
|
+
endCallbackCmdPackList
|
|
231
235
|
],
|
|
232
236
|
true,
|
|
233
|
-
endCallback ? (actorState: ActorState) => {
|
|
234
|
-
endCallback?.(actorState.xPos, actorState.yPos);
|
|
235
|
-
} : null
|
|
236
237
|
)
|
|
237
238
|
);
|
|
238
239
|
|
|
@@ -248,13 +249,15 @@ class ActorPackBuilder {
|
|
|
248
249
|
* xSpeed (double) 带符号整数,符号表示方向,标识运动的运行速度,单位(pixel/帧), 可设undefined代表不改变该轴速度
|
|
249
250
|
* ySpeed (double) 带符号整数,符号表示方向,标识运动的运行速度,单位(pixel/帧), 可设undefined代表不改变该轴速度
|
|
250
251
|
* spreadFrame (int) 选填,正整数, 变速需要经历帧数, 若为立即变速,则设置为0,或者不再设置(undefined)
|
|
251
|
-
* finishCallback (Function(xSpeed, ySpeed))
|
|
252
|
+
* finishCallback (Function(xSpeed, ySpeed) | Array) 选填,达到目标速度后的处理,当costTime不为0时有效
|
|
253
|
+
* Function: js消息通知(异步), 回调参数为(xSpeed, ySpeed)
|
|
254
|
+
* Array: 命令集(会按 then 链路进行翻译处理)
|
|
252
255
|
*/
|
|
253
256
|
altSpeed(
|
|
254
257
|
xSpeed: number | undefined,
|
|
255
258
|
ySpeed: number | undefined,
|
|
256
259
|
spreadFrame: number | undefined,
|
|
257
|
-
finishCallback: Function | null = null
|
|
260
|
+
finishCallback: Function | Array<CommandPackType | Function> | null = null
|
|
258
261
|
) {
|
|
259
262
|
if (!this._BasicPreProcess("altSpeed")) {
|
|
260
263
|
return;
|
|
@@ -275,18 +278,26 @@ class ActorPackBuilder {
|
|
|
275
278
|
// 均匀变速逻辑
|
|
276
279
|
cmdList.push(ActionCmdBuilder.AltSpeed(xSpeed, ySpeed, spreadFrame));
|
|
277
280
|
|
|
281
|
+
// finishCallback 可传 function 或命令数组
|
|
282
|
+
let finishCallbackCmdPackList = this._BuildCallbackCmdPackList(
|
|
283
|
+
finishCallback,
|
|
284
|
+
(callback: Function, actorState: ActorState) => {
|
|
285
|
+
callback?.(actorState.xSpd, actorState.ySpd);
|
|
286
|
+
}
|
|
287
|
+
);
|
|
288
|
+
|
|
278
289
|
// 创建结束ConditionSet
|
|
279
290
|
cmdList.push(
|
|
280
291
|
ActOnGetToSpeed(
|
|
281
|
-
this,
|
|
282
292
|
xSpeed, ySpeed,
|
|
283
|
-
[
|
|
284
|
-
|
|
293
|
+
[
|
|
294
|
+
CmdPackBuilder.InitStateCmdPack(ActionCmdBuilder.SetAccel(0, 0)),
|
|
295
|
+
this._NexusRecv ?
|
|
296
|
+
CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.FireNexusEvent(ActEventDefine.ActFinish, this._NexusRecv.token))
|
|
297
|
+
: null,
|
|
298
|
+
finishCallbackCmdPackList
|
|
285
299
|
],
|
|
286
300
|
true, // isFinal
|
|
287
|
-
finishCallback ? (actorState: ActorState) => {
|
|
288
|
-
finishCallback(actorState.xSpd, actorState.ySpd);
|
|
289
|
-
} : null
|
|
290
301
|
)
|
|
291
302
|
)
|
|
292
303
|
|
|
@@ -299,14 +310,19 @@ class ActorPackBuilder {
|
|
|
299
310
|
* 参数说明:
|
|
300
311
|
* targetX (int) 带符号整数,目标运动终点位置,如果设置为undefined,标识不以此轴为终点
|
|
301
312
|
* targetY (int) 带符号整数,目标运动终点位置,如果设置为undefined,标识不以此轴为终点
|
|
302
|
-
* finishCallback (Function(x,y))
|
|
303
|
-
*
|
|
313
|
+
* finishCallback (Function(x,y) | Array) 运动到目标位置后的处理, x或者y达到后即触发,以先到为准,回报当前Actor相对于原始位置的x,y
|
|
314
|
+
* Function: js消息通知(异步), 不要把新的run需求放这里, 会导致时机控制不准
|
|
315
|
+
* Array: 命令集(推荐用于动作链路编排)
|
|
316
|
+
* rejectedCallback (Function() | Array) 当前速度无法达到target位置时的处理,然后放弃改变任何速度和加速度
|
|
317
|
+
* Function: js消息通知(异步), 不要把新的run需求放这里, 会导致时机控制不准
|
|
318
|
+
* Array: 命令集(推荐用于动作链路编排)
|
|
319
|
+
* onFinishCommands (Array) 当执行完成的命令集, 对nexus响应的active/deactive调整放这里
|
|
304
320
|
*/
|
|
305
321
|
brakeToPosition(
|
|
306
322
|
targetX: number | undefined,
|
|
307
323
|
targetY: number | undefined,
|
|
308
|
-
finishCallback: Function | null = null,
|
|
309
|
-
rejectedCallback: Function | null = null
|
|
324
|
+
finishCallback: Function | Array<CommandPackType | Function> | null = null,
|
|
325
|
+
rejectedCallback: Function | Array<CommandPackType | Function> | null = null,
|
|
310
326
|
) {
|
|
311
327
|
// brakeToPosition 的设计
|
|
312
328
|
// 1. 由native根据当前的速度值和目标位置,计算出正好能停止到目标点的减速度
|
|
@@ -317,7 +333,7 @@ class ActorPackBuilder {
|
|
|
317
333
|
if (!this._NexusRecv) {
|
|
318
334
|
// 此动作的结束由native来判断和决定
|
|
319
335
|
// 要跟踪native的 ActFinish 事件
|
|
320
|
-
this._NexusRecv = this.
|
|
336
|
+
this._NexusRecv = this._ContorlSelfNexus;
|
|
321
337
|
}
|
|
322
338
|
|
|
323
339
|
if (!this._BasicPreProcess("brakeToPosition")) {
|
|
@@ -334,31 +350,43 @@ class ActorPackBuilder {
|
|
|
334
350
|
// 通过targetX和targetY以及内部当前的 xSpeed 和 ySpeed 状态,计算 xAcc 和 yAcc, 使运动接近目标位置时停止
|
|
335
351
|
cmdList.push(ActionCmdBuilder.BrakeToPos(targetX, targetY));
|
|
336
352
|
|
|
353
|
+
// 结束回调统一走 _BuildCallbackCmdPackList,避免各接口重复包装逻辑
|
|
354
|
+
let finishCallbackCmdPackList = this._BuildCallbackCmdPackList(
|
|
355
|
+
finishCallback,
|
|
356
|
+
(callback: Function, actorState: ActorState) => {
|
|
357
|
+
callback?.(actorState.xPos, actorState.yPos);
|
|
358
|
+
}
|
|
359
|
+
);
|
|
360
|
+
|
|
361
|
+
// reject 回调同样支持 function/命令数组两种形态
|
|
362
|
+
let rejectedCallbackCmdPackList = this._BuildCallbackCmdPackList(
|
|
363
|
+
rejectedCallback,
|
|
364
|
+
(callback: Function) => {
|
|
365
|
+
callback?.();
|
|
366
|
+
}
|
|
367
|
+
);
|
|
368
|
+
|
|
337
369
|
// 创建结束ConditionSet(ActFinish)
|
|
338
370
|
cmdList.push(
|
|
339
371
|
ActOnNexusEvent(
|
|
340
|
-
this,
|
|
341
372
|
this._NexusRecv.token,
|
|
342
373
|
ActEventDefine.ActFinish,
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}
|
|
374
|
+
[
|
|
375
|
+
...((finishCallbackCmdPackList || []) as Array<CommandPackType | Function | null>)
|
|
376
|
+
],
|
|
377
|
+
true, // isFinal
|
|
348
378
|
)
|
|
349
379
|
);
|
|
350
380
|
|
|
351
381
|
// 创建结束ConditionSet(ActReject)
|
|
352
382
|
cmdList.push(
|
|
353
383
|
ActOnNexusEvent(
|
|
354
|
-
this,
|
|
355
384
|
this._NexusRecv.token,
|
|
356
385
|
ActEventDefine.ActReject,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
}
|
|
386
|
+
[
|
|
387
|
+
...((rejectedCallbackCmdPackList || []) as Array<CommandPackType | Function | null>)
|
|
388
|
+
],
|
|
389
|
+
true
|
|
362
390
|
)
|
|
363
391
|
);
|
|
364
392
|
|
|
@@ -388,6 +416,28 @@ class ActorPackBuilder {
|
|
|
388
416
|
return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
|
|
389
417
|
}
|
|
390
418
|
|
|
419
|
+
/*
|
|
420
|
+
* scaleSpeed
|
|
421
|
+
* 按比例调整当前运行速度, 特别用于condition触发时,对当前render端速度具体值未知场景, 进行相对调整,立刻生效
|
|
422
|
+
*
|
|
423
|
+
* 参数说明:
|
|
424
|
+
* scaleX (double) x 速度缩放比例, 可为负数, -1代表转向, 可以传入undefined来决定此值不设置
|
|
425
|
+
* scaleY (double) y 速度缩放比例, 可为负数, -1代表转向, 可以传入undefined来决定此值不设置
|
|
426
|
+
*/
|
|
427
|
+
scaleSpeed(
|
|
428
|
+
scaleX: number | undefined,
|
|
429
|
+
scaleY: number | undefined,
|
|
430
|
+
) {
|
|
431
|
+
if (!this._BasicPreProcess("scaleSpeed")) {
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
let cmdList: Array<Object> = [];
|
|
436
|
+
cmdList.push(ActionCmdBuilder.ScaleSpeed(scaleX, scaleY));
|
|
437
|
+
|
|
438
|
+
return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
|
|
439
|
+
}
|
|
440
|
+
|
|
391
441
|
/*
|
|
392
442
|
* setSpeed
|
|
393
443
|
* 调整运行速度,立刻生效
|
|
@@ -395,12 +445,18 @@ class ActorPackBuilder {
|
|
|
395
445
|
* 参数说明:
|
|
396
446
|
* spdX (double) x 速度有效值,可正可负, 每帧的posX移动量, 可以传入undefined来决定此值不设置
|
|
397
447
|
* spdY (double) y 速度有效值,可正可负, 每帧的posY移动量, 可以传入undefined来决定此值不设置
|
|
448
|
+
* onRevertX (Function | Array) x速度过零反向时的处理
|
|
449
|
+
* Function: js消息通知(异步), 不要把新的run需求放这里, 会导致时机控制不准
|
|
450
|
+
* Array: 命令集(会按 then 链路进行翻译处理)
|
|
451
|
+
* onRevertY (Function | Array) y速度过零反向时的处理
|
|
452
|
+
* Function: js消息通知(异步), 不要把新的run需求放这里, 会导致时机控制不准
|
|
453
|
+
* Array: 命令集(会按 then 链路进行翻译处理)
|
|
398
454
|
*/
|
|
399
455
|
setAccel(
|
|
400
456
|
accelX: number | undefined,
|
|
401
457
|
accelY: number | undefined,
|
|
402
|
-
onRevertX: Function | null = null,
|
|
403
|
-
onRevertY: Function | null = null
|
|
458
|
+
onRevertX: Function | Array<CommandPackType | Function> | null = null,
|
|
459
|
+
onRevertY: Function | Array<CommandPackType | Function> | null = null
|
|
404
460
|
) {
|
|
405
461
|
if (!this._BasicPreProcess("setAccel")) {
|
|
406
462
|
return;
|
|
@@ -420,7 +476,7 @@ class ActorPackBuilder {
|
|
|
420
476
|
return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
|
|
421
477
|
}
|
|
422
478
|
|
|
423
|
-
|
|
479
|
+
/**
|
|
424
480
|
* setSpdAndAccel
|
|
425
481
|
* 同时设置速度和加速度,并提供拐点回调(用于抛物线处理)
|
|
426
482
|
*
|
|
@@ -429,16 +485,20 @@ class ActorPackBuilder {
|
|
|
429
485
|
* spdY (double) y 速度有效值,可正可负, 每帧的posY移动量, 可以传入undefined来决定此值不设置
|
|
430
486
|
* accelX (double) 加速度有效值,可正可负,每帧spdX的调整量,可以传入undefined来决定此值不设置
|
|
431
487
|
* accelY (double) 加速度有效值,可正可负,每帧spdY的调整量,可以传入undefined来决定此值不设置
|
|
432
|
-
* onRevertX (
|
|
433
|
-
*
|
|
488
|
+
* onRevertX (Function | Array) x速度开始反向运动时的处理(例如抛物到达顶点)
|
|
489
|
+
* Function: js消息通知(异步), 不要把新的run需求放这里, 会导致时机控制不准
|
|
490
|
+
* Array: 命令集(会按 then 链路进行翻译处理)
|
|
491
|
+
* onRevertY (Function | Array) y速度开始反向运动时的处理(例如抛物到达顶点)
|
|
492
|
+
* Function: js消息通知(异步), 不要把新的run需求放这里, 会导致时机控制不准
|
|
493
|
+
* Array: 命令集(会按 then 链路进行翻译处理)
|
|
434
494
|
*/
|
|
435
495
|
setSpdAndAccel(
|
|
436
496
|
spdX: number | undefined,
|
|
437
497
|
spdY: number | undefined,
|
|
438
498
|
accelX: number | undefined,
|
|
439
499
|
accelY: number | undefined,
|
|
440
|
-
onRevertX: Function | null = null,
|
|
441
|
-
onRevertY: Function | null = null
|
|
500
|
+
onRevertX: Function | Array<CommandPackType | Function> | null = null,
|
|
501
|
+
onRevertY: Function | Array<CommandPackType | Function> | null = null
|
|
442
502
|
) {
|
|
443
503
|
if (!this._BasicPreProcess("setSpdAndAccel")) {
|
|
444
504
|
return;
|
|
@@ -461,10 +521,12 @@ class ActorPackBuilder {
|
|
|
461
521
|
return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
|
|
462
522
|
}
|
|
463
523
|
|
|
464
|
-
|
|
524
|
+
/**
|
|
465
525
|
* stopMoving
|
|
466
526
|
* 停止运动
|
|
467
|
-
* isExact (boolean) 设置为true时,
|
|
527
|
+
* isExact (boolean) 设置为true时,
|
|
528
|
+
* 如果在positionCondition中会按照condition的位置进行精准停止
|
|
529
|
+
* 从而解决在condition.then中停止时,停止的位置因为上帧的drawX/Y + speedX/Y并不是完全和condition不吻合,而希望吻合的问题
|
|
468
530
|
*/
|
|
469
531
|
stopMoving(
|
|
470
532
|
isExact: boolean = true
|
|
@@ -474,21 +536,43 @@ class ActorPackBuilder {
|
|
|
474
536
|
}
|
|
475
537
|
|
|
476
538
|
let cmdList: Array<Object> = [];
|
|
477
|
-
|
|
539
|
+
if (isExact) {
|
|
540
|
+
cmdList.push(StateCmdBuilder.AlignPosition());
|
|
541
|
+
}
|
|
542
|
+
cmdList.push(ActionCmdBuilder.StopMoving());
|
|
543
|
+
|
|
544
|
+
return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* alignSpeed
|
|
549
|
+
* 在condition().then()中使用, 只在speed相关的condition中才会响应
|
|
550
|
+
* 用condition的速度设定值,来校准speed值, 相当于用condition的speed值来进行 action().setSpeed()
|
|
551
|
+
* 以解决加速对速度进行改变后,速度值已经超过了condition中设定的阈值时, 想纠正回来的场景
|
|
552
|
+
*
|
|
553
|
+
* 标准的停止加速度但保持速度的方法为: action(FreeMoveDef.KeepFlags.XY, 0).alignSpeed()
|
|
554
|
+
* 即通过action()构建的第二个参数把加速度清除
|
|
555
|
+
*/
|
|
556
|
+
alignSpeed() {
|
|
557
|
+
if (!this._BasicPreProcess("alignSpeed")) {
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
478
560
|
|
|
561
|
+
let cmdList: Array<Object> = [];
|
|
562
|
+
cmdList.push(ActionCmdBuilder.alignSpeed());
|
|
479
563
|
return CmdPackBuilder.InitActCmdPack(this._SpeedKeeps, this._AccKeeps, this._NexusRecv?.token, cmdList);
|
|
480
564
|
}
|
|
481
565
|
|
|
482
566
|
/**
|
|
483
567
|
* ackMovementSync
|
|
484
|
-
* 只能放在 movementSync 的then中,用于将Sync
|
|
568
|
+
* 只能放在 movementSync 的then中,用于将Sync同步信息按比例转化成自身的freeMoveDiv的位置值
|
|
485
569
|
* (注意): 如果触发链条上有自己发出的信息,则将不再产生动作,规避循环触发
|
|
486
570
|
*
|
|
487
571
|
* @param {int} horizontalStart 横向运动识别区域的0%对应位置, 可以为负
|
|
488
572
|
* @param {int} horizontalEnd 横向运动识别区域的100%对应位置, 可以为负,可以小于start
|
|
489
573
|
* @param {int} verticalStart 纵向运动识别区域的0%对应位置, 可以为负
|
|
490
574
|
* @param {int} verticalEnd 纵向运动识别区域的100%对应位置, 可以为负,可以小于end
|
|
491
|
-
* @param {int} xyEnable x,y是否都触发,
|
|
575
|
+
* @param {int} xyEnable x,y是否都触发, 使用FreeMoveDef.KeepFlags设置x,y,或者xy
|
|
492
576
|
* @param {int} syncType 换算公式:
|
|
493
577
|
* 1: 正比公式:selfPercent = givenPercent
|
|
494
578
|
* 2: 反比公式:selfPercent = (1 - givenPercent)
|
|
@@ -513,12 +597,26 @@ class ActorPackBuilder {
|
|
|
513
597
|
}
|
|
514
598
|
|
|
515
599
|
_BuildAccelOnPole(
|
|
516
|
-
builderThis:
|
|
600
|
+
builderThis: ActionPackBuilder,
|
|
517
601
|
cmdList: Array<Object>,
|
|
518
602
|
nexusRecv: NexusNode | null,
|
|
519
|
-
onRevertX: Function | null,
|
|
520
|
-
onRevertY: Function | null
|
|
603
|
+
onRevertX: Function | Array<CommandPackType | Function> | null,
|
|
604
|
+
onRevertY: Function | Array<CommandPackType | Function> | null
|
|
521
605
|
) {
|
|
606
|
+
// 拐点回调,支持函数或命令数组
|
|
607
|
+
let onRevertXCmdPackList = this._BuildCallbackCmdPackList(
|
|
608
|
+
onRevertX,
|
|
609
|
+
(callback: Function) => {
|
|
610
|
+
callback?.();
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
let onRevertYCmdPackList = this._BuildCallbackCmdPackList(
|
|
614
|
+
onRevertY,
|
|
615
|
+
(callback: Function) => {
|
|
616
|
+
callback?.();
|
|
617
|
+
}
|
|
618
|
+
);
|
|
619
|
+
|
|
522
620
|
if (nexusRecv || onRevertX || onRevertY) {
|
|
523
621
|
// RefObj: 外界可能希望了解速度拐点的ActEvent
|
|
524
622
|
// onRevertX || onRevertY: 通过callback希望了解速度拐点信息
|
|
@@ -526,31 +624,56 @@ class ActorPackBuilder {
|
|
|
526
624
|
// X轴拐点检测 newCondition
|
|
527
625
|
cmdList.push(
|
|
528
626
|
ActOnGetAcrossSpeed(
|
|
529
|
-
builderThis,
|
|
530
627
|
0, undefined,
|
|
531
|
-
[
|
|
628
|
+
[
|
|
629
|
+
nexusRecv ? CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.FireNexusEvent(ActEventDefine.SpeedRevertX, nexusRecv.token)) : null,
|
|
630
|
+
...((onRevertXCmdPackList || []) as Array<CommandPackType | Function | null>)
|
|
631
|
+
],
|
|
532
632
|
false, // isFinal
|
|
533
|
-
onRevertX ? () => {
|
|
534
|
-
onRevertX();
|
|
535
|
-
} : null
|
|
536
633
|
)
|
|
537
634
|
)
|
|
538
635
|
|
|
539
636
|
// Y轴拐点检测 newCondition
|
|
540
637
|
cmdList.push(
|
|
541
638
|
ActOnGetAcrossSpeed(
|
|
542
|
-
builderThis,
|
|
543
639
|
undefined, 0,
|
|
544
|
-
[
|
|
640
|
+
[
|
|
641
|
+
nexusRecv ? CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.FireNexusEvent(ActEventDefine.SpeedRevertY, nexusRecv.token)) : null,
|
|
642
|
+
...((onRevertYCmdPackList || []) as Array<CommandPackType | Function | null>)
|
|
643
|
+
],
|
|
545
644
|
false, // isFinal
|
|
546
|
-
onRevertY ? () => {
|
|
547
|
-
onRevertY();
|
|
548
|
-
} : null
|
|
549
645
|
)
|
|
550
646
|
)
|
|
551
647
|
}
|
|
552
648
|
}
|
|
553
649
|
|
|
650
|
+
private _BuildCallbackCmdPackList(
|
|
651
|
+
callback: Function | Array<CommandPackType | Function> | null,
|
|
652
|
+
callbackInvoker?: (callback: Function, actorState: ActorState) => void,
|
|
653
|
+
): Array<CommandPackType | Function | null> | null {
|
|
654
|
+
if (!callback) {
|
|
655
|
+
return null;
|
|
656
|
+
}
|
|
657
|
+
if (Array.isArray(callback)) {
|
|
658
|
+
// then 场景里的函数需要先翻译成内部 callbackCmd
|
|
659
|
+
TranslateCondThenCmdPackList(this._CallbackManager, callback);
|
|
660
|
+
return callback;
|
|
661
|
+
}
|
|
662
|
+
if (typeof callback === "function") {
|
|
663
|
+
// 纯函数回调统一包装成 callbackCmd,便于放入 command list
|
|
664
|
+
return [CmdPackBuilder.InitStateCmdPack(this._CallbackManager.buildCallbackCmd(
|
|
665
|
+
(actorState: ActorState) => {
|
|
666
|
+
if (callbackInvoker) {
|
|
667
|
+
callbackInvoker(callback, actorState);
|
|
668
|
+
} else {
|
|
669
|
+
callback?.(actorState);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
))];
|
|
673
|
+
}
|
|
674
|
+
return null;
|
|
675
|
+
}
|
|
676
|
+
|
|
554
677
|
_BasicPreProcess(procName: string) {
|
|
555
678
|
// CommonInfo 只能使用一次,规避多次使用问题
|
|
556
679
|
if (!this._CheckCommonInfo()) {
|
|
@@ -571,4 +694,4 @@ class ActorPackBuilder {
|
|
|
571
694
|
}
|
|
572
695
|
}
|
|
573
696
|
|
|
574
|
-
export default
|
|
697
|
+
export default ActionPackBuilder;
|