@shijiu/jsview-vue 2.2.201 → 2.2.373
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/BrowserApic.vue.mjs +2 -13
- package/bin/browser/BrowserApic2.vue.mjs +2 -13
- package/bin/browser/BrowserApicLib.mjs +24 -24
- package/bin/browser/BrowserAudio.vue.mjs +2 -10
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +21 -5
- package/bin/browser/BrowserJsvLatex.vue.mjs +39 -16
- package/bin/browser/BrowserPreload.vue.mjs +1 -5
- package/bin/browser/BrowserQrcode.vue.mjs +1 -5
- package/bin/browser/BrowserSpray.vue.mjs +2 -12
- package/bin/browser/BrowserTextureAnim.vue.mjs +2 -12
- package/bin/export-sfc.mjs +3 -3
- package/bin/jsview-vue-common.mjs +3 -3
- package/bin/jsview-vue.mjs +3216 -2086
- package/bin/types/JsViewEngineWidget/CheckType.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +37 -33
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +15 -2
- package/bin/types/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +14 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +280 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +7 -1
- package/bin/types/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Slide.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/VisibleInfo.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/RangeModel.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/Fence.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/index.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/WidgetCommon.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/index.d.ts +5 -1
- package/bin/types/JsViewPlugin/JsvAccount/JsvAccount.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/AudioProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/CheckType.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/Events.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/PluginLoader.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/ScreenLockManager.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/index.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/version.d.ts +5 -0
- package/bin/types/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/Color.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +24 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/PluginLoader.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/index.d.ts +5 -0
- package/bin/types/JsViewPlugin/JsvLatex/version.d.ts +4 -0
- package/bin/types/JsViewPlugin/index.d.ts +4 -0
- package/bin/types/JsViewVueTools/ConstSymbol.d.ts +4 -0
- package/bin/types/JsViewVueTools/DebugContentShellJBridge.d.ts +4 -0
- package/bin/types/JsViewVueTools/DebugTool.d.ts +4 -0
- package/bin/types/JsViewVueTools/DefaultKeyMap.d.ts +4 -0
- package/bin/types/JsViewVueTools/FeatureActive.d.ts +14 -0
- package/bin/types/JsViewVueTools/ForgeConstDefine.d.ts +4 -0
- package/bin/types/JsViewVueTools/ForgeHandles.d.ts +7 -3
- package/bin/types/JsViewVueTools/JsvDemoTester.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvDynamicCssStyle.d.ts +20 -1
- package/bin/types/JsViewVueTools/JsvDynamicKeyFrames.d.ts +21 -2
- package/bin/types/JsViewVueTools/JsvFederationTools.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvHashHistory.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvImpactTracer.d.ts +8 -4
- package/bin/types/JsViewVueTools/JsvPerformance.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvPreDownloader.d.ts +24 -2
- package/bin/types/JsViewVueTools/JsvRefTaker.d.ts +28 -3
- package/bin/types/JsViewVueTools/JsvRuntimeBridge.d.ts +50 -0
- package/bin/types/JsViewVueTools/JsvStyleClass.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvStyleSheetsDeclarer.d.ts +21 -1
- package/bin/types/JsViewVueTools/JsvTextTools.d.ts +85 -27
- package/bin/types/JsViewVueTools/JsvTextureDefines.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureLoadTool.d.ts +67 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +30 -4
- package/bin/types/JsViewVueTools/JsvTextureStore/Store.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/Texture.d.ts +4 -0
- package/bin/types/JsViewVueTools/NinePatchHelper.d.ts +5 -1
- package/bin/types/JsViewVueTools/TextureManagerTools.d.ts +11 -0
- package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +4 -0
- package/bin/types/JsViewVueTools/index.d.ts +7 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/ActorControlBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +38 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +27 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +28 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/GifData.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/WebpData.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +21 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +109 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFilterView.vue.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +34 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +106 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/index.d.ts +6 -2
- package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +48 -1
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +22 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/NexusNode.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvGrid.vue.d.ts +73 -0
- package/bin/types/JsViewVueWidget/JsvHole.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +14 -34
- package/bin/types/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +48 -0
- package/bin/types/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +27 -0
- package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +64 -209
- package/bin/types/JsViewVueWidget/JsvInput/SharedDefine.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +14 -0
- package/bin/types/JsViewVueWidget/JsvInput/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +20 -0
- package/bin/types/JsViewVueWidget/JsvLine/LineManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvLine/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMarquee.vue.d.ts +21 -0
- package/bin/types/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +20 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/Constant.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/DataTree.d.ts +7 -1
- package/bin/types/JsViewVueWidget/JsvMindMap/Geometry.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +90 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/rtree.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +30 -0
- package/bin/types/JsViewVueWidget/JsvPieChart.vue.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvPosterDiv.vue.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvPosterImage.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +42 -0
- package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvProgressBar.vue.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvRadarChart.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvRipple/Constant.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +45 -0
- package/bin/types/JsViewVueWidget/JsvRipple/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSector.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvSoundPool.d.ts +42 -0
- package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +40 -0
- package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +52 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +16 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteTools.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/SpriteController.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +39 -0
- package/bin/types/JsViewVueWidget/JsvSwiper/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvSwiper3D/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextBox.vue.d.ts +26 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/CommonType.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +7 -2
- package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +100 -0
- package/bin/types/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvVisibleSensor/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/index.d.ts +6 -0
- package/bin/types/index.d.ts +4 -0
- package/index.d.ts +8 -0
- package/package.json +1 -1
- package/tools/config/toolkit.mjs +81 -0
- package/tools/config/tsconfig.json +1 -0
- package/tools/config/vite.config.ts +24 -14
- package/tools/jsview-vue-build.mjs +66 -21
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +6 -2
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusManager.ts +22 -3
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +3 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +12 -5
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +208 -84
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +15 -9
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +2 -2
- package/utils/JsViewPlugin/JsvAudio/version.js +1 -1
- package/utils/JsViewPlugin/JsvAudio/version.mjs +1 -1
- package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +13 -3
- package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +27 -6
- package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +34 -28
- package/utils/JsViewPlugin/JsvLatex/index.js +22 -0
- package/utils/JsViewVueTools/FeatureActive.ts +84 -0
- package/utils/JsViewVueTools/ForgeHandles.ts +7 -3
- package/utils/JsViewVueTools/JsvDynamicCssStyle.js +2 -0
- package/utils/JsViewVueTools/JsvDynamicKeyFrames.ts +2 -0
- package/utils/JsViewVueTools/JsvImpactTracer.js +2 -0
- package/utils/JsViewVueTools/JsvPreDownloader.ts +2 -1
- package/utils/JsViewVueTools/JsvRefTaker.js +1 -2
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +67 -1
- package/utils/JsViewVueTools/JsvStyleClass.js +2 -0
- package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +2 -0
- package/utils/JsViewVueTools/JsvTextTools.ts +223 -0
- package/utils/JsViewVueTools/JsvTextureLoadTool.ts +233 -0
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +4 -1
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +7 -3
- package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +1 -0
- package/utils/JsViewVueTools/TextureManagerTools.ts +17 -0
- package/utils/JsViewVueTools/index.js +3 -0
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue +10 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +12 -1
- package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +4 -2
- package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +2 -0
- package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +219 -0
- package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +11 -9
- package/utils/JsViewVueWidget/JsvFilterView.vue +2 -0
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +5 -2
- package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +145 -0
- package/utils/JsViewVueWidget/JsvFlexCell/index.js +2 -5
- package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +39 -12
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +210 -62
- package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +9 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +2 -0
- package/utils/JsViewVueWidget/JsvGrid.vue +2 -0
- package/utils/JsViewVueWidget/JsvHole.js +2 -0
- package/utils/JsViewVueWidget/JsvInput/Cursor.vue +49 -45
- package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +320 -0
- package/utils/JsViewVueWidget/JsvInput/EditVisibleArea.ts +222 -0
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +281 -681
- package/utils/JsViewVueWidget/JsvInput/SharedDefine.ts +17 -0
- package/utils/JsViewVueWidget/JsvInput/SystemTextTools.ts +47 -0
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -0
- package/utils/JsViewVueWidget/JsvMarquee.vue +2 -0
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +2 -0
- package/utils/JsViewVueWidget/JsvMindMap/DataTree.ts +14 -1
- package/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue +277 -117
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +91 -68
- package/utils/JsViewVueWidget/JsvNinePatch.vue +5 -0
- package/utils/JsViewVueWidget/JsvPieChart.vue +2 -0
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +2 -0
- package/utils/JsViewVueWidget/JsvPosterImage.vue +2 -0
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +2 -0
- package/utils/JsViewVueWidget/JsvProgressBar.vue +2 -0
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +10 -11
- package/utils/JsViewVueWidget/JsvRadarChart.vue +2 -0
- package/utils/JsViewVueWidget/JsvRipple/Constant.js +2 -2
- package/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue +3 -1
- package/utils/JsViewVueWidget/JsvScaleTextBox.vue +2 -0
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +9 -0
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +9 -0
- package/utils/JsViewVueWidget/JsvSector.vue +2 -0
- package/utils/JsViewVueWidget/JsvSoundPool.js +2 -0
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +30 -13
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -0
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue +2 -0
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +2 -0
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +2 -0
- package/utils/JsViewVueWidget/JsvTextBox.vue +2 -4
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +44 -41
- package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +101 -0
- package/utils/JsViewVueWidget/JsvVideo.vue +2 -2
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +2 -0
- package/utils/JsViewVueWidget/index.js +2 -0
- package/utils/JsViewVueTools/JsvTextTools.js +0 -89
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define.mjs";
|
|
2
|
+
|
|
3
|
+
declare interface FontStyleDefine {
|
|
4
|
+
fontFamily: string,
|
|
5
|
+
fontSize: number,
|
|
6
|
+
fontStyle: string,
|
|
7
|
+
fontWeight: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* @Author: ChenChanghua
|
|
12
|
+
* @Date: 2022-11-29 14:26:20
|
|
13
|
+
* @LastEditors: Please set LastEditors
|
|
14
|
+
* @LastEditTime: 2023-02-02 10:20:45
|
|
15
|
+
* @Description: file content
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/*!
|
|
19
|
+
* 获取文字宽度, 一般用于测量文字宽度
|
|
20
|
+
*
|
|
21
|
+
* @param {string} text 文字
|
|
22
|
+
* @param {object} style 文字的css style
|
|
23
|
+
* @return {int} 文字宽度
|
|
24
|
+
**/
|
|
25
|
+
const getTextWidth = (text: string, style: FontStyleDefine) => {
|
|
26
|
+
const textParams = {
|
|
27
|
+
str: text ? text : "",
|
|
28
|
+
font: style.fontFamily ? style.fontFamily : Forge.TextUtils.sDefaultFont,
|
|
29
|
+
size: style.fontSize ? style.fontSize : Forge.TextUtils.sDefaultFontSize,
|
|
30
|
+
italic: style.fontStyle === "italic" ? "italic" : "",
|
|
31
|
+
bold: style.fontWeight === "bold" ? "bold" : "",
|
|
32
|
+
};
|
|
33
|
+
return (window as any).PlatformUtils.GetTextWidth(textParams);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/*!
|
|
37
|
+
* @typedef {object} SliceInfo
|
|
38
|
+
* @property {int} start - 文字起始index
|
|
39
|
+
* @property {int} end - 文字结束index
|
|
40
|
+
* @property {int} width - 文字宽度
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/*!
|
|
44
|
+
* @typedef {object} TextInfo
|
|
45
|
+
* @property {int} totalWidth - 文字整体宽度
|
|
46
|
+
* @property {Array<SliceInfo>} sliceInfo - 每段文字的信息
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/*!
|
|
50
|
+
* 单行超长文字会切成多个div拼接, 由于jsview坐标的取整机制, 拼接出的width和文字width会产生误差, 此接口会返回拼接后的width
|
|
51
|
+
*
|
|
52
|
+
* @param {string} text 文字
|
|
53
|
+
* @param {object} style 文字的css style
|
|
54
|
+
* @return {TextInfo} 文字信息
|
|
55
|
+
**/
|
|
56
|
+
const getOneLineTextDrawWidth = (text: string, style: FontStyleDefine) => {
|
|
57
|
+
if (text && typeof text != "string") {
|
|
58
|
+
text = "" + text; // 规避text为非字符串导致接口调用错误的问题
|
|
59
|
+
}
|
|
60
|
+
const info: Array<any> = (window as any).PlatformUtils.GetOneLineTextDrawWidth(
|
|
61
|
+
text ?? "",
|
|
62
|
+
style.fontFamily ?? Forge.TextUtils.sDefaultFont,
|
|
63
|
+
style.fontSize ?? Forge.TextUtils.sDefaultFontSize,
|
|
64
|
+
style.fontStyle === "italic" ? "italic" : "",
|
|
65
|
+
style.fontWeight === "bold" ? "bold" : "");
|
|
66
|
+
const result: {
|
|
67
|
+
totalWidth: number,
|
|
68
|
+
sliceInfo: Array<any>
|
|
69
|
+
} = {
|
|
70
|
+
totalWidth: info[0],
|
|
71
|
+
sliceInfo: [],
|
|
72
|
+
}
|
|
73
|
+
for (let i = 1; i < info.length; i += 3) {
|
|
74
|
+
result.sliceInfo.push({
|
|
75
|
+
start: info[i],
|
|
76
|
+
end: info[i + 1],
|
|
77
|
+
width: info[2 + 2],
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const isRtl = (str: string) => {
|
|
84
|
+
//arabic
|
|
85
|
+
for (let i = 0; i < str.length; i++) {
|
|
86
|
+
let c = str.charCodeAt(i);
|
|
87
|
+
if (c != 32) {
|
|
88
|
+
if (c >= 0x0600 && c <= 0x06ff) {
|
|
89
|
+
return true;
|
|
90
|
+
} else {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
declare interface RectSize {
|
|
101
|
+
width: number,
|
|
102
|
+
height: number,
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare interface PostionDefine {
|
|
106
|
+
x: number,
|
|
107
|
+
y: number
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* 获取光标的位置
|
|
112
|
+
*
|
|
113
|
+
* @public
|
|
114
|
+
* @func GetCursorPosition
|
|
115
|
+
* @memberof Forge.TextUtils
|
|
116
|
+
* @params {string} str 文字字符串
|
|
117
|
+
* @params {Forge.RectArea} max_rect
|
|
118
|
+
* @param {PackedFontParams} font_params 文本描述符(来源自 PackFontParams 函数)
|
|
119
|
+
* @param {PackedTextAttrs} text_attr (来源自 PackTextAttrs 函数)
|
|
120
|
+
* @param {int} line_height
|
|
121
|
+
* @param {int} pos_x 光标的偏移
|
|
122
|
+
* @return {Object} 光标的所在位置{x:0,y:0}
|
|
123
|
+
**/
|
|
124
|
+
function GetCursorPosition(
|
|
125
|
+
str: string,
|
|
126
|
+
max_rect: RectSize,
|
|
127
|
+
font_params: PackedFontParams,
|
|
128
|
+
text_attr: PackedTextAttrs,
|
|
129
|
+
line_height: number,
|
|
130
|
+
cursor_offset: number
|
|
131
|
+
): PostionDefine {
|
|
132
|
+
let api = (window as any).PlatformUtils?.GetCursorPosition.bind((window as any).PlatformUtils);
|
|
133
|
+
|
|
134
|
+
if (api) {
|
|
135
|
+
return api(str, max_rect, font_params, text_attr, line_height, cursor_offset);
|
|
136
|
+
} else {
|
|
137
|
+
return { x: 0, y: 0 }
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
class PackedFontParams {
|
|
142
|
+
public font?: string; // font family name
|
|
143
|
+
public size?: number; // font size
|
|
144
|
+
public bold?: string; // ""/"bold"
|
|
145
|
+
public italic?: string; // ""/"italic"
|
|
146
|
+
public alignment?: string; // left / right /center
|
|
147
|
+
public textColour?: string;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**k
|
|
151
|
+
* 创建文本描述符
|
|
152
|
+
*
|
|
153
|
+
* @public
|
|
154
|
+
* @func PackFontParam
|
|
155
|
+
* @param {string} font_family CSS字体名字,如“黑体 欧文”(支持多字体设置)
|
|
156
|
+
* @param {int} font_size
|
|
157
|
+
* @param {boolean} italic 是否为斜体
|
|
158
|
+
* @param {boolean} bold 是否加粗
|
|
159
|
+
* @param {string} alignment 水平对齐方式,支持("left", "middle", "right", "justify")
|
|
160
|
+
* @param {string} text_color 文字颜色(format "#FFFFFF")
|
|
161
|
+
**/
|
|
162
|
+
function PackFontParams(
|
|
163
|
+
font_family: string | null,
|
|
164
|
+
font_size: number,
|
|
165
|
+
bold: boolean,
|
|
166
|
+
italic: boolean,
|
|
167
|
+
alignment: string,
|
|
168
|
+
text_color: string | null): PackedFontParams {
|
|
169
|
+
|
|
170
|
+
let packed = new PackedFontParams();
|
|
171
|
+
|
|
172
|
+
if (!font_size) font_size = Forge.TextUtils.sDefaultFontSize;
|
|
173
|
+
if (!font_family) font_family = Forge.TextUtils.sDefaultFont;
|
|
174
|
+
|
|
175
|
+
packed.size = font_size;
|
|
176
|
+
packed.font = font_family!;
|
|
177
|
+
packed.italic = italic ? "italic" : "";
|
|
178
|
+
packed.bold = bold ? "bold" : "";
|
|
179
|
+
|
|
180
|
+
packed.alignment = (alignment && alignment.length > 0) ? alignment : "left";
|
|
181
|
+
packed.textColour = text_color ? text_color : Forge.TextUtils.sDefaultFontColor;
|
|
182
|
+
|
|
183
|
+
return packed;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
declare interface PackedTextAttrs {
|
|
187
|
+
text_overflow: string;
|
|
188
|
+
word_wrap: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* 创建文本区域描述符
|
|
193
|
+
*
|
|
194
|
+
* @public
|
|
195
|
+
* @func PackTextAttrs
|
|
196
|
+
* @param {String} text_overflow 超过描画边界时的处理方式:<br>
|
|
197
|
+
* "none" 按照文字宽度描画<br>
|
|
198
|
+
* "clip" 超出本分不显示(默认)<br>
|
|
199
|
+
* "ellipsis" 如果超出,则末尾显示“...”
|
|
200
|
+
* 其余字符 当文字超出时,用此字符替换“...”的位置
|
|
201
|
+
* @param {String} word_wrap 设置自然换行规则<br>
|
|
202
|
+
* "none":“不折行”<br>
|
|
203
|
+
* "normal":折行时,尽量不切断单词(仅支持英文单词)<br>
|
|
204
|
+
* "break_word":不去识别单词,到达边缘就折行(执行效率高)
|
|
205
|
+
* @return {PackedTextAttrs} 文本区域描述符
|
|
206
|
+
**/
|
|
207
|
+
function PackTextAttrs(text_overflow: string, word_wrap: string): PackedTextAttrs {
|
|
208
|
+
if (!text_overflow) text_overflow = "none";
|
|
209
|
+
if (!word_wrap) word_wrap = "none";
|
|
210
|
+
|
|
211
|
+
return { text_overflow: text_overflow, word_wrap: word_wrap };
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const TextTools = {
|
|
215
|
+
getOneLineTextDrawWidth,
|
|
216
|
+
getTextWidth,
|
|
217
|
+
isRtl,
|
|
218
|
+
PackFontParams,
|
|
219
|
+
PackTextAttrs,
|
|
220
|
+
GetCursorPosition
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export { getTextWidth, TextTools };
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file
|
|
3
|
+
*
|
|
4
|
+
* 内部组件
|
|
5
|
+
*
|
|
6
|
+
* JsvTextureLoadTool: 对给定列表的图片资源进行后台预加载
|
|
7
|
+
* 特别注意: 在vue组件进行关联时,要在unmounted中进行对preload返回的句柄进行主动的release动作
|
|
8
|
+
*
|
|
9
|
+
* @method
|
|
10
|
+
* preload
|
|
11
|
+
* @param {Array(ItemSet)} preloadList
|
|
12
|
+
* @param {Function} finishCallback
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import ForgeHandles from "./ForgeHandles";
|
|
16
|
+
|
|
17
|
+
const CONST_FORMAT_TOKEN = 3349;
|
|
18
|
+
class ItemSet {
|
|
19
|
+
public url: String | null;
|
|
20
|
+
public width: number;
|
|
21
|
+
public height: number;
|
|
22
|
+
public colorType: String;
|
|
23
|
+
public netSetting: any;
|
|
24
|
+
public isPosterImg: boolean;
|
|
25
|
+
public magicToken: number = CONST_FORMAT_TOKEN; // 用于规避非规定的输入值
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @constructor
|
|
29
|
+
* @param {String} url 必填,图片的url,目前只支持 http:// 和 ./ 两个格式
|
|
30
|
+
* @param {number} width 选填,是否为了省内存而按照给定尺寸压缩图片
|
|
31
|
+
* @param {number} height 选填,是否为了省内存而按照给定尺寸压缩图片
|
|
32
|
+
* @param {String} color_type 选填,是否为了省内存而做成其他的图片解码格式
|
|
33
|
+
* @param {String} net_setting 选填,是否有特殊的网络header设置
|
|
34
|
+
* @param {boolean} is_poster_img 选填, 是否为统计为海报,海报有一套解码优先级处理
|
|
35
|
+
*/
|
|
36
|
+
constructor(
|
|
37
|
+
url: String,
|
|
38
|
+
width: number = 0,
|
|
39
|
+
height: number = 0,
|
|
40
|
+
color_type: String = "RGBA_8888",
|
|
41
|
+
net_setting: any = null,
|
|
42
|
+
is_poster_img: boolean = false
|
|
43
|
+
) {
|
|
44
|
+
if (!url || url.length == 0) {
|
|
45
|
+
console.warn("Error: url should not empty(null, \"\")");
|
|
46
|
+
}
|
|
47
|
+
this.url = url;
|
|
48
|
+
this.width = width;
|
|
49
|
+
this.height = height;
|
|
50
|
+
this.colorType = color_type;
|
|
51
|
+
this.netSetting = net_setting;
|
|
52
|
+
this.isPosterImg = is_poster_img;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
class ItemStatus {
|
|
57
|
+
public loadStatus: boolean = false;
|
|
58
|
+
public listenerToken: number = -1;
|
|
59
|
+
public textureRef: any;
|
|
60
|
+
|
|
61
|
+
releaseResource() {
|
|
62
|
+
if (this.listenerToken != -1 && this.textureRef) {
|
|
63
|
+
this.textureRef.DisableBackgroundLoad();
|
|
64
|
+
this.textureRef.UnregisterLoadImageCallback(
|
|
65
|
+
this.listenerToken
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
this.listenerToken = -1;
|
|
69
|
+
this.textureRef = null;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
class ListStatus {
|
|
75
|
+
public loadStatusList: Array<ItemStatus>;
|
|
76
|
+
public loadedInfoList: Array<any>;
|
|
77
|
+
public originDataList: Array<ItemSet>;
|
|
78
|
+
public loadingItemCount: number = 0;
|
|
79
|
+
public finishCallback: Function;
|
|
80
|
+
|
|
81
|
+
constructor(origin_data: Array<ItemSet>, finish_callback: Function) {
|
|
82
|
+
this.loadStatusList = new Array(origin_data.length).fill(null);
|
|
83
|
+
this.loadedInfoList = new Array(origin_data.length).fill(null);
|
|
84
|
+
this.originDataList = origin_data;
|
|
85
|
+
this.finishCallback = finish_callback;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
onLoaded(index: number, loaded_info: any) {
|
|
89
|
+
let item_status = this.loadStatusList[index];
|
|
90
|
+
if (item_status && !item_status.loadStatus) {
|
|
91
|
+
item_status.loadStatus = true;
|
|
92
|
+
this.loadedInfoList[index] = loaded_info;
|
|
93
|
+
this.loadingItemCount--;
|
|
94
|
+
if (this.loadingItemCount == 0) {
|
|
95
|
+
this.finishCallback?.(this.loadedInfoList);
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
console.warn(`warn: url=${this.originDataList[index].url} already true`)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
recycleResource() {
|
|
103
|
+
for (let item of this.loadStatusList) {
|
|
104
|
+
item?.releaseResource();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const _buildTextureRequest = (index: number, item_set: ItemSet, list_recorder: ListStatus): boolean => {
|
|
110
|
+
if (item_set.magicToken !== CONST_FORMAT_TOKEN) {
|
|
111
|
+
console.error(
|
|
112
|
+
"Error:format mismatch, data should comes from function buildPreloadInfo()"
|
|
113
|
+
);
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const base_url = item_set.url;
|
|
118
|
+
let image_url = base_url;
|
|
119
|
+
if (base_url) {
|
|
120
|
+
if (base_url.startsWith("jsvtexturestore://")) {
|
|
121
|
+
// 直接加载,不需要跟踪
|
|
122
|
+
return false;
|
|
123
|
+
} else if (base_url.startsWith(".") || base_url?.startsWith("/")) {
|
|
124
|
+
// 相对路径,要根据jsview的api进行改造
|
|
125
|
+
if ((window as any).JsView) {
|
|
126
|
+
image_url = (((window as any).JsView as any).Dom as any).UrlRef(base_url).herf;
|
|
127
|
+
} else {
|
|
128
|
+
// Browser端不需要调整url
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// 是否为指定size节省内存的texture
|
|
133
|
+
let target_size: { width: number, height: number } | null = null;
|
|
134
|
+
if (item_set.width !== 0 && item_set.height !== 0) {
|
|
135
|
+
target_size = { width: item_set.width, height: item_set.height };
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
let texture: any = ForgeHandles.TextureManager.GetImage2(
|
|
139
|
+
image_url,
|
|
140
|
+
false,
|
|
141
|
+
target_size,
|
|
142
|
+
item_set.colorType,
|
|
143
|
+
item_set.netSetting ?? "",
|
|
144
|
+
item_set.isPosterImg
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
if (!texture) {
|
|
148
|
+
console.error(
|
|
149
|
+
"Error: Preload view build texture failed for " + image_url
|
|
150
|
+
);
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
let item_status: ItemStatus = new ItemStatus();
|
|
155
|
+
list_recorder.loadStatusList[index] = item_status;
|
|
156
|
+
|
|
157
|
+
// 追加回调处理
|
|
158
|
+
item_status.listenerToken = texture.RegisterLoadImageCallback(null, (params: any) => {
|
|
159
|
+
console.log(`preload succeed ${item_set.url}, params:${JSON.stringify(params)}`);
|
|
160
|
+
list_recorder.loadStatusList[index].releaseResource();
|
|
161
|
+
list_recorder.onLoaded(index, params);
|
|
162
|
+
});
|
|
163
|
+
// 脱离view进行加载,
|
|
164
|
+
// 如果没有真实的view进行挂载很可能就会被快速地清理掉
|
|
165
|
+
// 但理论上,使用此组件的外部vue会对图片进行捆绑
|
|
166
|
+
texture.EnableBackgroundLoad();
|
|
167
|
+
|
|
168
|
+
// 记录textureRef,为了进行release时的释放动作
|
|
169
|
+
item_status.textureRef = texture;
|
|
170
|
+
|
|
171
|
+
return true;
|
|
172
|
+
} else {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const _readPreloadViewIdList = (
|
|
178
|
+
preload_list_data: Array<ItemSet> | null,
|
|
179
|
+
finish_callback: Function): ListStatus | null => {
|
|
180
|
+
|
|
181
|
+
if (!preload_list_data || preload_list_data?.length == 0) {
|
|
182
|
+
console.warn("empty list");
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
let ret_list_status: ListStatus = new ListStatus(preload_list_data, finish_callback);
|
|
187
|
+
|
|
188
|
+
// 直接在map前将为null的值删除掉
|
|
189
|
+
for (let i = 0; i < preload_list_data.length; i++) {
|
|
190
|
+
if (!preload_list_data[i] || !preload_list_data[i].url) {
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if (_buildTextureRequest(i, preload_list_data[i], ret_list_status)) {
|
|
195
|
+
// 记录已经发送的texture请求
|
|
196
|
+
ret_list_status.loadingItemCount++;
|
|
197
|
+
} else {
|
|
198
|
+
// jsvtexturestore or build texture failed
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (ret_list_status.loadingItemCount == 0) {
|
|
203
|
+
// 无需要preload的内容
|
|
204
|
+
return null;
|
|
205
|
+
} else {
|
|
206
|
+
return ret_list_status;
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* 对给定的ItemSet进行preload加载,返回 ListStatus,
|
|
212
|
+
* 注意: 在vue的unmount处理中要调用ListStatus.recycleResource()进行资源回收
|
|
213
|
+
*
|
|
214
|
+
* @function
|
|
215
|
+
* @param {ItemSet} preload_list_data 要加载资源的ItemSet列表
|
|
216
|
+
* @param {Function} finish_callback 全加载完成后的回调函数
|
|
217
|
+
* @returns {ListStatus}
|
|
218
|
+
*/
|
|
219
|
+
function preload(
|
|
220
|
+
preload_list_data: Array<ItemSet> | null,
|
|
221
|
+
finish_callback: Function): ListStatus | null {
|
|
222
|
+
|
|
223
|
+
return _readPreloadViewIdList(preload_list_data, finish_callback);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const JsvTextureLoadTool = {
|
|
227
|
+
preload,
|
|
228
|
+
ItemSet
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export {
|
|
232
|
+
JsvTextureLoadTool
|
|
233
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ForgeHandles from "../../../JsViewVueTools/ForgeHandles";
|
|
2
2
|
import { TextureBase } from "../Texture"
|
|
3
|
+
import { FeatureNames, JsvUseFeature } from "../../FeatureActive";
|
|
3
4
|
|
|
4
5
|
export type CapturedCallback = (
|
|
5
6
|
textureAccessName: string,
|
|
@@ -19,6 +20,9 @@ export class CapturedTexture extends TextureBase {
|
|
|
19
20
|
autoRecycle: boolean) {
|
|
20
21
|
super(null);
|
|
21
22
|
|
|
23
|
+
// 激活引擎的功能支持
|
|
24
|
+
JsvUseFeature('JsvTextureStoreApi', FeatureNames.Capture2Texture);
|
|
25
|
+
|
|
22
26
|
this._CaptureDiv = captureDiv;
|
|
23
27
|
this._Callback = callback;
|
|
24
28
|
this._AutoRecycle = autoRecycle;
|
|
@@ -45,7 +49,6 @@ export class CapturedTexture extends TextureBase {
|
|
|
45
49
|
|
|
46
50
|
// 处理自动回收
|
|
47
51
|
if (!this._AutoRecycle) {
|
|
48
|
-
this.textureRef.DisableAutoRecycle(); // 取消自动清理
|
|
49
52
|
this.addToStore(); // 用TextureStore来跟进引用状态
|
|
50
53
|
}
|
|
51
54
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
2
|
+
* @file JsvTextureStoreApi
|
|
3
|
+
*
|
|
3
4
|
* canvasTexture:
|
|
4
5
|
* 创建texture(图片纹理)句柄, 通过 CanvasTexture 的API进行绘制, 使用注意以下几点
|
|
5
6
|
* a. commit() 接口调用之前可以任意绘制, commit之后就无法更改, commit之后才能使用, commit后绘制内容会被全局保存
|
|
@@ -59,8 +60,11 @@ let sTextureStoreApi = {
|
|
|
59
60
|
* width: number, // 截取div的宽
|
|
60
61
|
* height: number) => void // 截取div的高
|
|
61
62
|
* @param {boolean} autoRecycle 可选, 是否当无div/img引用时会自动释放
|
|
62
|
-
*
|
|
63
|
-
|
|
63
|
+
* true默认值: 此场景在回调时要立刻赋值给响应式变量控制template的节点立刻使用(并且不是v-if=false的节点),
|
|
64
|
+
否则会自动释放掉, 此时, texture当使用它的template节点从dom树中去掉的时候(v-if=false也算)会自动释放,
|
|
65
|
+
不需要主动调用deleteTexture释放.
|
|
66
|
+
false: 此场景在callback收到资源名后, 需要使用完毕后调用 deleteTexture 手动释放
|
|
67
|
+
在手动释放之前,可以赋给其他div/img来复用
|
|
64
68
|
* @return {CapturedTexture} 用于cancel的句柄,当cancel时,会清理对div和Callback的引用
|
|
65
69
|
*/
|
|
66
70
|
capture2Texture: (
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
function GetColorTexture(manager_ref: any, color_define: string) {
|
|
3
|
+
return manager_ref.GetColorTexture(color_define);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
function GetImage(manager_ref: any, image_url: string) {
|
|
7
|
+
return manager_ref.GetImage2(image_url, false, null, "RGB_8888", null)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let ForgeTextureApis = {
|
|
11
|
+
GetColorTexture,
|
|
12
|
+
GetImage
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
ForgeTextureApis,
|
|
17
|
+
}
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
<!--
|
|
10
|
+
* @file
|
|
11
|
+
*
|
|
10
12
|
* 【模块 export 内容】
|
|
11
13
|
* JsvApic:Vue高阶组件,控制动图播放
|
|
12
14
|
* prop说明:
|
|
@@ -21,8 +23,14 @@
|
|
|
21
23
|
-->
|
|
22
24
|
<script>
|
|
23
25
|
import ForgeHandles from "../../../JsViewVueTools/ForgeHandles";
|
|
24
|
-
import { LoopType } from "../JsvCommonLoopToolBase";
|
|
25
|
-
|
|
26
|
+
// import { LoopType } from "../JsvCommonLoopToolBase";
|
|
27
|
+
export const LoopType = {
|
|
28
|
+
LOOP_DEFAULT: 0,
|
|
29
|
+
LOOP_INFINITE: 1,
|
|
30
|
+
LOOP_FINITE: 2,
|
|
31
|
+
LOOP_PART: 3,
|
|
32
|
+
LOOP_SINGLE: 4,
|
|
33
|
+
};
|
|
26
34
|
export default {
|
|
27
35
|
props: {
|
|
28
36
|
src: String,
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
<!--
|
|
10
|
+
* @file
|
|
11
|
+
*
|
|
10
12
|
* 【模块 export 内容】
|
|
11
13
|
* JsvApic:Vue高阶组件,控制动图播放
|
|
12
14
|
* prop说明:
|
|
@@ -29,7 +31,16 @@
|
|
|
29
31
|
-->
|
|
30
32
|
<script>
|
|
31
33
|
import ForgeHandles from "../../../JsViewVueTools/ForgeHandles";
|
|
32
|
-
import { LoopType } from "../JsvCommonLoopToolBase";
|
|
34
|
+
// import { LoopType } from "../JsvCommonLoopToolBase";
|
|
35
|
+
|
|
36
|
+
//为了打包后少加载一个文件这里单独定义
|
|
37
|
+
const LoopType = {
|
|
38
|
+
LOOP_DEFAULT: 0,
|
|
39
|
+
LOOP_INFINITE: 1,
|
|
40
|
+
LOOP_FINITE: 2,
|
|
41
|
+
LOOP_PART: 3,
|
|
42
|
+
LOOP_SINGLE: 4,
|
|
43
|
+
};
|
|
33
44
|
|
|
34
45
|
export default {
|
|
35
46
|
props: {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<!--
|
|
2
|
+
* @file
|
|
3
|
+
*
|
|
2
4
|
* 【模块 export 内容】
|
|
3
5
|
* JsvClipDiv: Vue高阶组件,overhidden:true的div,附带有其他clip设定能力
|
|
4
6
|
* props说明:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
* style: {Object} (必选, 响应式) 同div的style, 提供top, left, width, height, transition, transform信息,
|
|
8
|
+
* 但目前不支持borderRaduis
|
|
7
9
|
*
|
|
8
10
|
* expose函数说明:
|
|
9
11
|
*
|