@shijiu/jsview-vue-samples 2.3.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/ABImageAlt/App.vue +114 -0
- package/ABImageAlt/Item.vue +133 -0
- package/{MetroWidgetDemos/SkeletonDiagram/assets/imageList.json → ABImageAlt/assets/imageList.js} +9 -1
- package/ABImageAlt/data.js +17 -0
- package/AI_Check_Rules.txt +5 -0
- package/AnimPicture/App.vue +20 -10
- package/ApicSwitch/App.vue +90 -0
- package/ApicSwitch/TabItem.vue +65 -0
- package/ApicSwitch/WebpShow.vue +24 -0
- package/ApicSwitch/data.js +50 -0
- package/Basic/AI_skills_update.md +1 -0
- package/Basic/components/div/ColorFormatTest.vue +93 -0
- package/Basic/components/div/DivRadius.vue +97 -15
- package/Basic/components/div/DivTag3Group.vue +30 -0
- package/Basic/components/img/ImageType.vue +65 -0
- package/Basic/components/panel/Panel2.vue +13 -1
- package/Basic/components/text/TextAlign.vue +7 -1
- package/BlobLoadTest/App.vue +201 -0
- package/BreakLinesApi/App.vue +82 -0
- package/CanvasDrawChart/App.vue +11 -0
- package/CanvasDrawChart/Graph1.vue +104 -0
- package/CanvasDrawChart/Graph2.vue +115 -0
- package/DashPath/App.vue +17 -16
- package/DashPath/AppForOperator.vue +2 -4
- package/DemoForOperator/AnimPic/AnimPic.vue +24 -2
- package/DemoForOperator/Banger/Banger/Banger.vue +73 -9
- package/DemoForOperator/Blur/Blur.vue +146 -0
- package/DemoForOperator/Blur/BlurInOut/BlurInOut.vue +184 -0
- package/DemoForOperator/Blur/BlurInOut/StaticBgSlide.vue +162 -0
- package/DemoForOperator/Blur/BlurPopup/BlurPopup.vue +249 -0
- package/DemoForOperator/BookFlip/App.vue +115 -0
- package/DemoForOperator/BookFlip/BookPage.vue +82 -0
- package/DemoForOperator/Bounce/Bounce.vue +33 -1
- package/DemoForOperator/Bounce/FreeMoveBuilder.js +1 -1
- package/DemoForOperator/ChunLian/Couplets.vue +44 -1
- package/DemoForOperator/ClickSpriteAnim/App.vue +130 -0
- package/DemoForOperator/ClickSpriteAnim/Item.vue +74 -0
- package/DemoForOperator/DominantColor/App.vue +187 -0
- package/DemoForOperator/EpisodeList/EpisodeList/Controller.vue +0 -3
- package/DemoForOperator/EpisodeList/EpisodeList/EpisodeList.vue +76 -2
- package/DemoForOperator/Firework1/App.vue +13 -2
- package/DemoForOperator/Firework1/Fireworks.vue +68 -11
- package/DemoForOperator/FlipPage/FlipPage/FlipPage.vue +30 -1
- package/DemoForOperator/Focus/Alpha/AlphaFocusBox.vue +27 -2
- package/DemoForOperator/Focus/Alpha/Item.vue +1 -0
- package/DemoForOperator/Focus/Light/Item.vue +1 -0
- package/DemoForOperator/Focus/Light/LightFocusBox.vue +42 -1
- package/DemoForOperator/Focus/Normal/Item.vue +1 -0
- package/DemoForOperator/Focus/Normal/NormalFocusBox.vue +12 -0
- package/DemoForOperator/FrameShadow/App.vue +193 -0
- package/DemoForOperator/FrameShadow/FrameShadow.vue +61 -0
- package/DemoForOperator/FullscreenIn/App.vue +1 -1
- package/DemoForOperator/FullscreenIn/FullscreenPoster.vue +18 -3
- package/DemoForOperator/Genie/App.vue +20 -6
- package/DemoForOperator/Genie/App2.vue +61 -0
- package/DemoForOperator/Genie/geniePakcer/GenieImage.vue +298 -0
- package/DemoForOperator/Genie/geniePakcer/GenieSlot.vue +292 -0
- package/DemoForOperator/Genie/geniePakcer/GenieTools.ts +463 -0
- package/DemoForOperator/GrayFilter/GrayFilter.vue +21 -0
- package/DemoForOperator/Jigsaw/JigsawFull.vue +58 -11
- package/DemoForOperator/Jigsaw/JigsawSingle.vue +47 -9
- package/DemoForOperator/LongChatBox/App.vue +36 -0
- package/DemoForOperator/LongChatBox/Bubble.vue +116 -0
- package/DemoForOperator/LongChatBox/LongChat.vue +204 -0
- package/DemoForOperator/LongChatBox/testData.js +14 -0
- package/DemoForOperator/Particle/Drop/DropParticle.vue +33 -1
- package/DemoForOperator/Particle/Explode/ExplodeParticle.vue +23 -2
- package/DemoForOperator/PosterAnim/PosterAnim.js +21 -0
- package/DemoForOperator/PosterOverflow/PosterOverflow.vue +16 -0
- package/DemoForOperator/Resize/App.vue +157 -0
- package/DemoForOperator/Resize/Resize/Item.vue +234 -0
- package/DemoForOperator/Resize/Resize/Resize.vue +96 -0
- package/DemoForOperator/Ripple/Ripple.vue +16 -1
- package/DemoForOperator/ScreenShootScale/App.vue +96 -0
- package/DemoForOperator/ScreenShootScale/Back.vue +86 -0
- package/DemoForOperator/ScreenShootScale/Front.vue +133 -0
- package/DemoForOperator/ScreenShootScale/Item.vue +62 -0
- package/DemoForOperator/ScreenShootScale/ScreenShootScale.vue +109 -0
- package/DemoForOperator/SmoothSwiper/App.vue +50 -0
- package/DemoForOperator/Sound/Bounce/App.vue +56 -0
- package/DemoForOperator/Sound/Bounce/Bounce.vue +87 -0
- package/DemoForOperator/Sound/Bounce/FreeMoveBuilder.js +146 -0
- package/DemoForOperator/Sound/Bounce/bgmusic.mp3 +0 -0
- package/DemoForOperator/Sound/Bounce/coin.mp3 +0 -0
- package/DemoForOperator/Sound/FocusMove/App.vue +134 -0
- package/DemoForOperator/Sound/FocusMove/Item.vue +43 -0
- package/DemoForOperator/Sound/FocusMove/move.mp3 +0 -0
- package/DemoForOperator/Sound/Rain/App.vue +11 -0
- package/DemoForOperator/Sound/Rain/Raining/Rain.vue +69 -0
- package/DemoForOperator/Sound/Rain/Raining/RainScene.vue +118 -0
- package/DemoForOperator/Sound/Sound/Sound.vue +24 -0
- package/DemoForOperator/Sound/Sound/index.js +4 -0
- package/DemoForOperator/Sound/Sound/useSound.js +112 -0
- package/DemoForOperator/Sprite/Sprite.vue +62 -5
- package/DemoForOperator/Stretch/Stretch/Stretch.vue +52 -2
- package/DemoForOperator/Swiper/App.vue +101 -0
- package/DemoForOperator/Swiper/Item.vue +56 -0
- package/DemoForOperator/Swiper/ParallaxSlide.vue +164 -0
- package/DemoForOperator/TabContent/TabContent/TabContent.vue +39 -1
- package/DemoForOperator/TabContentVertical/App.vue +104 -0
- package/DemoForOperator/TabContentVertical/ContentPage.vue +67 -0
- package/DemoForOperator/TabContentVertical/Item.vue +94 -0
- package/DemoForOperator/TabContentVertical/PageItem.vue +40 -0
- package/DemoForOperator/TabContentVertical/TabContent/CreepFocus.vue +160 -0
- package/DemoForOperator/TabContentVertical/TabContent/Item.vue +63 -0
- package/DemoForOperator/TabContentVertical/TabContent/TabContent.vue +184 -0
- package/DemoForOperator/TabContentVertical/TabContent/TabItem.vue +368 -0
- package/DemoForOperator/TabContentVertical/TabContent/TabWidget.vue +259 -0
- package/DemoForOperator/TabContentVertical/TabContent/Util.js +3 -0
- package/DemoForOperator/TabContentVertical/TabContent/ViewSwiper.vue +110 -0
- package/DemoForOperator/TabContentVertical/assets/children_science.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/documentary.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/free.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/game.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/home_selected.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/movie_ticket.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/my_account.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/opera.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/sports.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/tv_drama.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/variety_show.png +0 -0
- package/DemoForOperator/TabContentVertical/assets/vip.png +0 -0
- package/DemoForOperator/TabContentVertical/testData.js +76 -0
- package/DemoForOperator/Vortex/Vortex/Vortex.vue +26 -0
- package/DemoForOperator/routeList.js +125 -2
- package/DemoHomepage/App.vue +74 -1
- package/DemoHomepage/components/BodyFrame.vue +5 -0
- package/DemoHomepage/components/Item.vue +11 -0
- package/DemoHomepage/components/TabFrame.vue +1 -1
- package/DemoHomepage/router.js +798 -140
- package/DemoHomepage/views/Homepage.vue +60 -2
- package/DemoHomepage/watchTest.vue +50 -0
- package/DomRenderer/App.vue +133 -0
- package/FilterDemo/AnimatePic.vue +63 -17
- package/FilterDemo/App.vue +3 -3
- package/FlexCellDemo/AI_skills_update.md +4 -0
- package/FlexCellDemo/TestFrame1.vue +12 -2
- package/FlexCellDemo/TestFrame2.vue +10 -1
- package/FlexCellDemo/TestFrame3.vue +114 -59
- package/FpsLimit/App.vue +102 -0
- package/FreeMove/App.vue +24 -279
- package/FreeMove/TestScene1.vue +260 -0
- package/FreeMove/TestScene3.vue +431 -0
- package/FreeMoveChildAttract/App.vue +18 -8
- package/FreeMoveLink/App.vue +51 -22
- package/GiftRain/components/SpriteTranslate.vue +68 -48
- package/HashHistory/App.vue +2 -2
- package/HashHistory/router.js +1 -1
- package/Hover/App.vue +144 -0
- package/HttpRequestSSE/SSEReader.js +200 -0
- package/ImpactStop/App.vue +2 -2
- package/Input/FullKeyboard.vue +3 -3
- package/Input/InputPanel.vue +63 -3
- package/JsvLine/App.vue +53 -38
- package/LatexDemo/App.vue +3 -1
- package/LatexFormula/App.vue +196 -0
- package/LongImage/App.vue +1 -1
- package/LongImage/LongImageScroll.vue +111 -46
- package/LongImage/Scroll.vue +28 -9
- package/LongText/LongTextScroll.vue +14 -1
- package/Markdown/App.vue +36 -0
- package/Markdown/Bubble.vue +109 -0
- package/Markdown/LongChat.vue +216 -0
- package/Markdown/data.js +633 -0
- package/MetroWidgetDemos/AI_skills_update.md +2 -0
- package/MetroWidgetDemos/EpgFlowListType/App.vue +206 -0
- package/MetroWidgetDemos/EpgFlowListType/components/ContentCard.vue +105 -0
- package/MetroWidgetDemos/EpgFlowListType/components/FloorSection.vue +131 -0
- package/MetroWidgetDemos/EpgFlowListType/components/LeftTabItem.vue +41 -0
- package/MetroWidgetDemos/EpgFlowListType/data.js +78 -0
- package/MetroWidgetDemos/ListExpand/ChildItem.vue +130 -0
- package/MetroWidgetDemos/ListExpand/ExpandItem.vue +375 -0
- package/MetroWidgetDemos/ListExpand/ExpandItem1.vue +403 -0
- package/MetroWidgetDemos/ListExpand/assets/arrow-down.png +0 -0
- package/MetroWidgetDemos/ListExpand/assets/up-arrow.png +0 -0
- package/MetroWidgetDemos/ListExpand/components/WidgetListHandler.vue +150 -0
- package/MetroWidgetDemos/ListExpand/index.vue +88 -0
- package/MetroWidgetDemos/ListExpand/list.js +2421 -0
- package/MetroWidgetDemos/RefreshDemo/App.vue +14 -1
- package/MetroWidgetDemos/RenderAccelerate/App.vue +142 -0
- package/MetroWidgetDemos/RenderAccelerate/AppPage.vue +78 -0
- package/MetroWidgetDemos/RenderAccelerate/AppTab.vue +62 -0
- package/MetroWidgetDemos/RenderAccelerate/ContentItem.vue +409 -0
- package/MetroWidgetDemos/{TripleWidget → RenderAccelerate}/Item.vue +6 -3
- package/MetroWidgetDemos/RenderAccelerate/TabItem.vue +100 -0
- package/MetroWidgetDemos/RenderAccelerate/ViewSwiper.vue +215 -0
- package/MetroWidgetDemos/RenderAccelerate/WidgetItem.vue +107 -0
- package/MetroWidgetDemos/SkeletonDiagram/App.vue +35 -8
- package/MetroWidgetDemos/SkeletonDiagram/Item.vue +11 -2
- package/MetroWidgetDemos/SkeletonDiagram/assets/imageList.js +245 -0
- package/MetroWidgetDemos/SkeletonDiagram/data.js +3 -3
- package/MetroWidgetDemos/SpatialNav/App.vue +177 -0
- package/MetroWidgetDemos/SpatialNav/Buttons.vue +83 -0
- package/MetroWidgetDemos/SpatialNav/CustomFocus.vue +57 -0
- package/MetroWidgetDemos/SpatialNav/Item.vue +71 -0
- package/MetroWidgetDemos/SpatialNav/SimpleFloor.vue +86 -0
- package/MetroWidgetDemos/SpatialNav/StepMw.vue +113 -0
- package/MetroWidgetDemos/SpatialNav/TabContent/TabContent.vue +185 -0
- package/MetroWidgetDemos/SpatialNav/TripleSection/TripleSection.vue +69 -0
- package/MetroWidgetDemos/SpatialNav/TripleSection/WidgetItem.vue +100 -0
- package/MetroWidgetDemos/SpatialNav/TvSection/List.vue +75 -0
- package/MetroWidgetDemos/SpatialNav/TvSection/TvSection.vue +91 -0
- package/MetroWidgetDemos/basic2/App.vue +407 -0
- package/MetroWidgetDemos/basic2/Item.vue +68 -0
- package/MetroWidgetDemos/direction/App.vue +22 -0
- package/MetroWidgetDemos/gazeFocusDiff/App.vue +126 -0
- package/MetroWidgetDemos/gazeFocusDiff/Item.vue +87 -0
- package/MetroWidgetDemos/minimalUsage/App.vue +66 -0
- package/MetroWidgetDemos/minimalUsage/Item.vue +54 -0
- package/MetroWidgetDemos/ninePatchFocusPage/App.vue +23 -7
- package/MetroWidgetDemos/ninePatchFocusPage/Item.vue +7 -5
- package/MetroWidgetDemos/ninePatchFocusPage/focusConstants.js +2 -0
- package/MetroWidgetDemos/routeList.js +229 -8
- package/MetroWidgetDemos/slideSetting/App.vue +288 -99
- package/MetroWidgetDemos/zIndex/App.vue +117 -0
- package/MetroWidgetDemos/zIndex/Item.vue +61 -0
- package/NinePatchTester/App.vue +24 -31
- package/PosterPacker/App.vue +2 -2
- package/PreDecode/App.vue +140 -0
- package/ReactiveTest/App.vue +115 -0
- package/ReactiveTest/Item.vue +92 -0
- package/ReactiveTest/assets/imageList.js +245 -0
- package/ReactiveTest/component/TestSmartDiv.vue +50 -0
- package/ReactiveTest/component/TestSmartDivSrcList.vue +74 -0
- package/ReactiveTest/component/TestSmartImage.vue +46 -0
- package/ReactiveTest/component/TestSmartImageSrcList.vue +90 -0
- package/ReactiveTest/component/TestSmartImageStyle.vue +41 -0
- package/ReactiveTest/data.js +49 -0
- package/ScreenToBlob/App.vue +250 -0
- package/ScrollBoxTest/App.vue +52 -28
- package/ScrollBoxTest/ClipBar.vue +64 -2
- package/ScrollBoxTest/NinePatchBar.vue +64 -2
- package/ScrollBoxTest/SizeDivBar.vue +64 -2
- package/SecTorTest/App.vue +9 -3
- package/SpringFestival/SpringFestivalScene/FreeMoveBuilder.js +3 -3
- package/SyncDecode/App.vue +137 -0
- package/TextSizeLimit/App.vue +211 -0
- package/TextureAnimation/App3.vue +11 -1
- package/TouchWidget/App.vue +90 -5
- package/TouchWidget/WidgetItem.vue +1 -0
- package/TransitPage/App.vue +2 -0
- package/ViewOpacity/App.vue +19 -0
- package/assets/logo.png +0 -0
- package/package.json +1 -1
- package/DashPath/DashPath.vue +0 -118
- package/DemoForOperator/Genie/geniePakcer/Genie.vue +0 -699
- package/DemoForOperator/ScalePoster/App.vue +0 -4
- package/DemoForOperator/ScalePoster/ScalePoster.vue +0 -0
- package/DivMetroPerformance/App.vue +0 -157
- package/DivMetroPerformance/Item.vue +0 -58
- package/DivMetroPerformance/assets/bg.jpg +0 -0
- package/DivMetroPerformance/assets/coupon_content.png +0 -0
- package/DivMetroPerformance/assets/coupon_left.png +0 -0
- package/DivMetroPerformance/assets/coupon_mid.png +0 -0
- package/DivMetroPerformance/assets/coupon_right.png +0 -0
- package/DivMetroPerformance/assets/focus_border.png +0 -0
- package/DivMetroPerformance/assets/holder_logo.png +0 -0
- package/DivMetroPerformance/assets/jrbm.png +0 -0
- package/DivMetroPerformance/assets/line_left.png +0 -0
- package/DivMetroPerformance/assets/line_mid.png +0 -0
- package/DivMetroPerformance/assets/line_right.png +0 -0
- package/DivMetroPerformance/assets/loading.png +0 -0
- package/DivMetroPerformance/assets/logo.png +0 -0
- package/DivMetroPerformance/assets/mcjx.png +0 -0
- package/DivMetroPerformance/assets/tao.png +0 -0
- package/DivMetroPerformance/assets/tmall.png +0 -0
- package/DivMetroPerformance/border.png +0 -0
- package/DivMetroPerformance/components/ContentItem.vue +0 -384
- package/DivMetroPerformance/components/MyTab.vue +0 -129
- package/DivMetroPerformance/data.js +0 -124
- package/DivMetroPerformance/utils/GridItem.vue +0 -28
- package/DivMetroPerformance/utils/GridPlate.vue +0 -85
- package/MediaDemo/App.vue +0 -127
- package/MediaDemo/assets/audio-poster.png +0 -0
- package/MediaDemo/components/Button.vue +0 -69
- package/MediaDemo/components/Controllor.vue +0 -286
- package/MediaDemo/components/StatusBar.vue +0 -100
- package/MediaDemo/components/frames/AudioFrame.vue +0 -39
- package/MediaDemo/components/frames/AudioPoster.vue +0 -48
- package/MediaDemo/components/frames/MediaFrame.vue +0 -153
- package/MediaDemo/components/frames/VideoFrame.vue +0 -39
- package/MetroWidgetDemos/TripleWidget/App.vue +0 -81
- package/MetroWidgetDemos/TripleWidget/SWidgetItem.vue +0 -93
- package/MetroWidgetDemos/TripleWidget/WidgetItem.vue +0 -111
- package/Parkour/App.vue +0 -13
- package/Parkour/Common/Context.js +0 -21
- package/Parkour/Common/MatchmanInfo.js +0 -62
- package/Parkour/Common/Random.js +0 -61
- package/Parkour/Common/Sound.js +0 -50
- package/Parkour/appConfig/HOW_TO_CONFIG.md +0 -20
- package/Parkour/appConfig/app.config.mjs +0 -5
- package/Parkour/appConfig/app_sign_private_key_sample.crt +0 -28
- package/Parkour/appConfig/app_sign_public_key_sample.pem +0 -9
- package/Parkour/appConfig/jsview.config.mjs +0 -39
- package/Parkour/assets/Bgimages/bg1.png +0 -0
- package/Parkour/assets/Bgimages/bg2.png +0 -0
- package/Parkour/assets/Bgimages/bg3.png +0 -0
- package/Parkour/assets/Bgimages/bg4.png +0 -0
- package/Parkour/assets/Bgimages/bg5.png +0 -0
- package/Parkour/assets/audio/jump.mp3 +0 -0
- package/Parkour/assets/audio/lose.mp3 +0 -0
- package/Parkour/assets/role_skin1/fail.json +0 -44
- package/Parkour/assets/role_skin1/fail.png +0 -0
- package/Parkour/assets/role_skin1/jump_down.json +0 -20
- package/Parkour/assets/role_skin1/jump_down.png +0 -0
- package/Parkour/assets/role_skin1/jump_up.json +0 -44
- package/Parkour/assets/role_skin1/jump_up.png +0 -0
- package/Parkour/assets/role_skin1/roll.json +0 -44
- package/Parkour/assets/role_skin1/roll.png +0 -0
- package/Parkour/assets/role_skin1/run.json +0 -52
- package/Parkour/assets/role_skin1/run.png +0 -0
- package/Parkour/components/Backdrop.vue +0 -61
- package/Parkour/components/GameSence.vue +0 -602
- package/Parkour/components/Matchman.vue +0 -85
- package/TextureAnimation/utils/FrameCanvasStore.ts +0 -68
- package/TextureAnimation/utils/RotateFrame.vue +0 -146
- package/TextureAnimation/utils/circleHaloMask.png +0 -0
- package/ThrowMoveDemo/AccelerateDemo.vue +0 -85
- package/ThrowMoveDemo/App.vue +0 -104
- package/ThrowMoveDemo/LRParabolicDemo.vue +0 -101
- package/ThrowMoveDemo/TargetDemo.vue +0 -87
- package/ThrowMoveDemo/UDParabolicDemo.vue +0 -92
- /package/{AnimPicture/assets → assets}/animated_webp.webp +0 -0
- /package/{AnimPicture/assets → assets}/ball_3.webp +0 -0
- /package/{AnimPicture/assets → assets}/girl_run.gif +0 -0
- /package/{AnimPicture/assets → assets}/quan.webp +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:style="{
|
|
4
|
+
width: 400,
|
|
5
|
+
height: 400,
|
|
6
|
+
backgroundColor: '#007788',
|
|
7
|
+
}"
|
|
8
|
+
></div>
|
|
9
|
+
<div
|
|
10
|
+
:style="{
|
|
11
|
+
width: 400,
|
|
12
|
+
height: 400,
|
|
13
|
+
backgroundImage: `url(jsvtexturestore://${sourceId})`,
|
|
14
|
+
}"
|
|
15
|
+
></div>
|
|
16
|
+
<div
|
|
17
|
+
v-for="pos in position"
|
|
18
|
+
:key="pos.x + pos.y"
|
|
19
|
+
:style="{
|
|
20
|
+
left: pos.x - 5,
|
|
21
|
+
top: pos.y - 5,
|
|
22
|
+
width: 10,
|
|
23
|
+
height: 10,
|
|
24
|
+
backgroundColor: '#00ff0055',
|
|
25
|
+
}"
|
|
26
|
+
></div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import { JsvTextureStoreApi } from "jsview";
|
|
31
|
+
import { JsvDashPath } from "jsview";
|
|
32
|
+
import { onBeforeUnmount } from "vue";
|
|
33
|
+
|
|
34
|
+
const chartHelper = JsvTextureStoreApi.getChartHelper(
|
|
35
|
+
400,
|
|
36
|
+
400,
|
|
37
|
+
[-50, 450],
|
|
38
|
+
[-50, 450]
|
|
39
|
+
);
|
|
40
|
+
const canvas = chartHelper.getCanvas();
|
|
41
|
+
|
|
42
|
+
//绘制x轴
|
|
43
|
+
const { path: xAxis } = chartHelper.linePath(
|
|
44
|
+
[
|
|
45
|
+
{ x: -30, y: 0 },
|
|
46
|
+
{ x: 430, y: 0 },
|
|
47
|
+
],
|
|
48
|
+
0,
|
|
49
|
+
0
|
|
50
|
+
);
|
|
51
|
+
xAxis.strokeWithSetting({
|
|
52
|
+
lineWidth: 1,
|
|
53
|
+
color: "#000000",
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
//绘制y轴
|
|
57
|
+
const { path: yAxis } = chartHelper.linePath(
|
|
58
|
+
[
|
|
59
|
+
{ x: 0, y: -30 },
|
|
60
|
+
{ x: 0, y: 430 },
|
|
61
|
+
],
|
|
62
|
+
0,
|
|
63
|
+
0
|
|
64
|
+
);
|
|
65
|
+
yAxis.strokeWithSetting({
|
|
66
|
+
lineWidth: 1,
|
|
67
|
+
color: "#000000",
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const data = [
|
|
71
|
+
{ x: 0, y: 200 },
|
|
72
|
+
{ x: 50, y: 130 },
|
|
73
|
+
{ x: 100, y: 200 },
|
|
74
|
+
{ x: 150, y: 150 },
|
|
75
|
+
{ x: 200, y: 300 },
|
|
76
|
+
{ x: 250, y: 100 },
|
|
77
|
+
{ x: 300, y: 20 },
|
|
78
|
+
{ x: 350, y: 150 },
|
|
79
|
+
{ x: 400, y: 10 },
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
//绘制折线图(不闭合)
|
|
83
|
+
/**
|
|
84
|
+
* linePath参数说明
|
|
85
|
+
* @param data {Data[]} 数据点数组,每个点包含 x 和 y 坐标
|
|
86
|
+
* @param isBroken {boolean} 是否为折线
|
|
87
|
+
* @param close {number}
|
|
88
|
+
* 0: 不闭合,绘制线段用,
|
|
89
|
+
* 1: 闭合到x轴(自动绘制左右两端垂直于x轴的线段), 需要填充颜色时用
|
|
90
|
+
* 2: 闭合到y轴(自动绘制上下两端垂直于y轴的线段), 需要填充颜色时用
|
|
91
|
+
* @returns {CustomPath, Data[]} 路径对象和数据点数组,每个点包含 x 和 y 坐标
|
|
92
|
+
*/
|
|
93
|
+
const { path, position } = chartHelper.linePath(data, true, 0);
|
|
94
|
+
path.strokeWithSetting({
|
|
95
|
+
lineWidth: 2,
|
|
96
|
+
color: "#0088FF",
|
|
97
|
+
dash: [10, 5],
|
|
98
|
+
phase: 0,
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
//绘制柱状图
|
|
102
|
+
const originPos = chartHelper.getOriginPosition();
|
|
103
|
+
//data2Pos获取数据点对应的坐标
|
|
104
|
+
const pos2 = chartHelper.data2Pos(data);
|
|
105
|
+
for (const pos of pos2) {
|
|
106
|
+
const rect = canvas.rectPath(pos.x - 10, pos.y, pos.x + 10, originPos.y);
|
|
107
|
+
rect.fill("#0000FF88");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const sourceId = canvas.commit();
|
|
111
|
+
onBeforeUnmount(() => {
|
|
112
|
+
//注意释放资源
|
|
113
|
+
JsvTextureStoreApi.deleteTexture(sourceId);
|
|
114
|
+
});
|
|
115
|
+
</script>
|
package/DashPath/App.vue
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}"
|
|
8
8
|
>
|
|
9
9
|
<!-- 带缺口的矩形 -->
|
|
10
|
-
<
|
|
10
|
+
<JsvDashPath
|
|
11
11
|
:points="[
|
|
12
12
|
{ x: 200, y: 0 }, // 右上角
|
|
13
13
|
{ x: 200, y: 100 }, // 右边中点(缺口处)
|
|
@@ -23,17 +23,15 @@
|
|
|
23
23
|
:layout="{
|
|
24
24
|
left: 50,
|
|
25
25
|
top: 50,
|
|
26
|
-
width: 250,
|
|
27
|
-
height: 200,
|
|
28
26
|
}"
|
|
29
27
|
/>
|
|
30
28
|
|
|
31
29
|
<!-- 三角形 -->
|
|
32
|
-
<
|
|
30
|
+
<JsvDashPath
|
|
33
31
|
:points="[
|
|
34
|
-
{ x:
|
|
35
|
-
{ x:
|
|
36
|
-
{ x:
|
|
32
|
+
{ x: -50, y: -50 }, // 顶点
|
|
33
|
+
{ x: 50, y: -50 }, // 右下角
|
|
34
|
+
{ x: 50, y: 150 }, // 左下角
|
|
37
35
|
]"
|
|
38
36
|
:dash="[15, 8]"
|
|
39
37
|
:phase="2"
|
|
@@ -41,14 +39,19 @@
|
|
|
41
39
|
:lineWidth="4"
|
|
42
40
|
:layout="{
|
|
43
41
|
left: 350,
|
|
44
|
-
top:
|
|
45
|
-
width: 250,
|
|
46
|
-
height: 200,
|
|
42
|
+
top: 100,
|
|
47
43
|
}"
|
|
48
44
|
/>
|
|
45
|
+
<div :style="{
|
|
46
|
+
left: 350,
|
|
47
|
+
top: 100,
|
|
48
|
+
width: 5,
|
|
49
|
+
height: 5,
|
|
50
|
+
backgroundColor: '#00FF00',
|
|
51
|
+
}"></div>
|
|
49
52
|
|
|
50
53
|
<!-- 凸字形 -->
|
|
51
|
-
<
|
|
54
|
+
<JsvDashPath
|
|
52
55
|
:points="[
|
|
53
56
|
{ x: 0, y: 0 }, // 左上角
|
|
54
57
|
{ x: 200, y: 0 }, // 右上角
|
|
@@ -62,18 +65,16 @@
|
|
|
62
65
|
:dash="[20, 10]"
|
|
63
66
|
:phase="5"
|
|
64
67
|
color="#0088FF"
|
|
65
|
-
:lineWidth="
|
|
68
|
+
:lineWidth="10"
|
|
66
69
|
:layout="{
|
|
67
70
|
left: 650,
|
|
68
71
|
top: 50,
|
|
69
|
-
width: 250,
|
|
70
|
-
height: 200,
|
|
71
72
|
}"
|
|
72
73
|
/>
|
|
73
74
|
</div>
|
|
74
75
|
</template>
|
|
75
76
|
|
|
76
77
|
<script setup>
|
|
77
|
-
import
|
|
78
|
-
|
|
78
|
+
import { JsvDashPath } from "jsview";
|
|
79
|
+
</script>
|
|
79
80
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}"
|
|
8
8
|
>
|
|
9
9
|
<!-- 带缺口的矩形 -->
|
|
10
|
-
<
|
|
10
|
+
<JsvDashPath
|
|
11
11
|
:points="[
|
|
12
12
|
{ x: 200, y: 0 }, // 右上角
|
|
13
13
|
{ x: 200, y: 100 }, // 右边中点(缺口处)
|
|
@@ -22,14 +22,12 @@
|
|
|
22
22
|
:layout="{
|
|
23
23
|
left: 150,
|
|
24
24
|
top: 150,
|
|
25
|
-
width: 250,
|
|
26
|
-
height: 200,
|
|
27
25
|
}"
|
|
28
26
|
/>
|
|
29
27
|
</div>
|
|
30
28
|
</template>
|
|
31
29
|
|
|
32
30
|
<script setup>
|
|
33
|
-
import
|
|
31
|
+
import { JsvDashPath } from "jsview";
|
|
34
32
|
</script>
|
|
35
33
|
|
|
@@ -5,18 +5,40 @@
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { JsvApic2, LoopType, ApicEndState } from "jsview";
|
|
7
7
|
import { shallowRef, onMounted } from "vue";
|
|
8
|
+
|
|
8
9
|
const props = defineProps({
|
|
10
|
+
/**
|
|
11
|
+
* 动画资源路径(必填)
|
|
12
|
+
* @type {String}
|
|
13
|
+
* @required
|
|
14
|
+
*/
|
|
9
15
|
src: {
|
|
10
16
|
type: String,
|
|
11
17
|
required: true,
|
|
12
18
|
},
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 动画循环配置
|
|
22
|
+
* @type {Number|String}
|
|
23
|
+
* @default 0
|
|
24
|
+
* @property {Number} [>=0] - 有限循环次数(0表示不循环)
|
|
25
|
+
* @property {Number} [-1] - 无限循环
|
|
26
|
+
* @property {String} ['default'] - 使用动画默认循环设置
|
|
27
|
+
* @property {String} ['infinite'] - 无限循环
|
|
28
|
+
*/
|
|
13
29
|
repeat: {
|
|
14
30
|
type: [String, Number],
|
|
15
|
-
default: 0,
|
|
31
|
+
default: 0, // 默认不循环
|
|
16
32
|
},
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 布局样式配置
|
|
36
|
+
* @type {Object}
|
|
37
|
+
* @optional
|
|
38
|
+
*/
|
|
17
39
|
layout: {
|
|
18
40
|
type: Object,
|
|
19
|
-
}
|
|
41
|
+
}
|
|
20
42
|
});
|
|
21
43
|
|
|
22
44
|
const apicRef = shallowRef();
|
|
@@ -109,15 +109,79 @@ import {
|
|
|
109
109
|
import { _formatInfo } from "./SpriteDeal";
|
|
110
110
|
|
|
111
111
|
const props = defineProps({
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
112
|
+
/**
|
|
113
|
+
* 组件顶端中心Left位置(单位:px)
|
|
114
|
+
* @type {Number}
|
|
115
|
+
* @default 0
|
|
116
|
+
*/
|
|
117
|
+
left: {
|
|
118
|
+
type: Number,
|
|
119
|
+
default: 0
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* 组件顶端中心Top位置(单位:px)
|
|
123
|
+
* @type {Number}
|
|
124
|
+
* @default 0
|
|
125
|
+
*/
|
|
126
|
+
top: {
|
|
127
|
+
type: Number,
|
|
128
|
+
default: 0
|
|
129
|
+
},
|
|
130
|
+
/**
|
|
131
|
+
* 鞭炮个数(决定组件长度)
|
|
132
|
+
* @type {Number}
|
|
133
|
+
* @default 12
|
|
134
|
+
*/
|
|
135
|
+
num: {
|
|
136
|
+
type: Number,
|
|
137
|
+
default: 12
|
|
138
|
+
},
|
|
139
|
+
/**
|
|
140
|
+
* 组件整体宽度(单位:px)
|
|
141
|
+
* @type {Number}
|
|
142
|
+
* @requires true
|
|
143
|
+
*/
|
|
144
|
+
width: {
|
|
145
|
+
type: Number,
|
|
146
|
+
require: true
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* 引线燃烧时间(单位:秒)
|
|
150
|
+
* @type {Number}
|
|
151
|
+
* @requires true
|
|
152
|
+
*/
|
|
153
|
+
leadWireTime: {
|
|
154
|
+
type: Number,
|
|
155
|
+
require: true
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* 星星特效资源路径数组
|
|
159
|
+
* @type {Array}
|
|
160
|
+
*/
|
|
161
|
+
starSrcs: {
|
|
162
|
+
type: Array
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* 鞭炮资源路径
|
|
166
|
+
* @type {String}
|
|
167
|
+
*/
|
|
168
|
+
bangerSpriteSrc: {
|
|
169
|
+
type: String
|
|
170
|
+
},
|
|
171
|
+
/**
|
|
172
|
+
* 火花特效动画资源路径
|
|
173
|
+
* @type {String}
|
|
174
|
+
*/
|
|
175
|
+
sparkSpriteSrc: {
|
|
176
|
+
type: String
|
|
177
|
+
},
|
|
178
|
+
/**
|
|
179
|
+
* 引线图片资源路径
|
|
180
|
+
* @type {String}
|
|
181
|
+
*/
|
|
182
|
+
leadWireSrc: {
|
|
183
|
+
type: String
|
|
184
|
+
}
|
|
121
185
|
});
|
|
122
186
|
|
|
123
187
|
const leadWire = props.leadWireSrc;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @file Blur.vue
|
|
3
|
+
*
|
|
4
|
+
* 【模块 export 内容】
|
|
5
|
+
* Blur:Vue组件,用于显示模糊效果的纹理
|
|
6
|
+
* layout {Object}: (必填)组件布局信息对象,包含组件的位置和尺寸
|
|
7
|
+
* 格式为 {left: number, top: number, width: number, height: number}
|
|
8
|
+
* showRectPos {Object}: (必填)显示内容相对于原图左上角的位置
|
|
9
|
+
* 格式为 {left: number, top: number}
|
|
10
|
+
* borderRadius {Number}: 边框圆角半径,默认值 0
|
|
11
|
+
* textureInfo {Object}: (必填)纹理信息对象,一般是captureBlurTexture的返回值
|
|
12
|
+
* 格式为 {textureId: string, width: number, height: number}
|
|
13
|
+
*
|
|
14
|
+
* captureBlurTexture(divRef, blurRadius): 捕获模糊纹理的方法
|
|
15
|
+
* divRef {HTMLElement}: 要捕获的DOM元素引用
|
|
16
|
+
* blurRadius {Number}: 模糊半径
|
|
17
|
+
* 返回值 {Promise<Object>}: 包含纹理信息的Promise,格式为 {textureId: string, width: number, height: number}
|
|
18
|
+
*
|
|
19
|
+
* 注意事项:
|
|
20
|
+
* 组件会根据传入的textureInfo自动计算变换和缩放
|
|
21
|
+
* 使用前需要先调用captureBlurTexture方法获取纹理信息
|
|
22
|
+
-->
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<jsv-texture-anim
|
|
26
|
+
:key="randomKey"
|
|
27
|
+
:src="sourceSrc"
|
|
28
|
+
:left="layout.left"
|
|
29
|
+
:top="layout.top"
|
|
30
|
+
:width="layout.width"
|
|
31
|
+
:height="layout.height"
|
|
32
|
+
:transform="translateTransform"
|
|
33
|
+
:borderRadius="borderRadius"
|
|
34
|
+
></jsv-texture-anim>
|
|
35
|
+
</template>
|
|
36
|
+
<script setup>
|
|
37
|
+
import { JsvTextureAnim } from "jsview";
|
|
38
|
+
import { shallowRef, computed } from "vue";
|
|
39
|
+
|
|
40
|
+
const randomKey = Math.random().toString(36).substring(2, 15);
|
|
41
|
+
|
|
42
|
+
const props = defineProps({
|
|
43
|
+
/**
|
|
44
|
+
* @description 布局信息对象,包含组件的位置和尺寸
|
|
45
|
+
* @property {number} left - 组件左侧位置
|
|
46
|
+
* @property {number} top - 组件顶部位置
|
|
47
|
+
* @property {number} width - 组件宽度
|
|
48
|
+
* @property {number} height - 组件高度
|
|
49
|
+
*/
|
|
50
|
+
layout: {
|
|
51
|
+
type: Object,
|
|
52
|
+
required: true,
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* @description 显示内容相对于原图左上角的位置
|
|
56
|
+
* @property {number} left - 显示区域左侧位置
|
|
57
|
+
* @property {number} top - 显示区域顶部位置
|
|
58
|
+
*/
|
|
59
|
+
showRectPos: {
|
|
60
|
+
type: Object,
|
|
61
|
+
required: true,
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* @description 边框圆角半径
|
|
65
|
+
* @default 0
|
|
66
|
+
*/
|
|
67
|
+
borderRadius: {
|
|
68
|
+
type: Number,
|
|
69
|
+
default: 0,
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* @description 纹理信息对象, 一般是captureBlurTexture的返回值
|
|
73
|
+
* @property {string} textureId - 纹理ID
|
|
74
|
+
* @property {number} width - 纹理宽度
|
|
75
|
+
* @property {number} height - 纹理高度
|
|
76
|
+
*/
|
|
77
|
+
textureInfo: {
|
|
78
|
+
type: Object,
|
|
79
|
+
required: true,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
const sourceSrc = computed(() => {
|
|
83
|
+
console.log("sourceSrc", props.textureInfo?.textureId);
|
|
84
|
+
return props.textureInfo?.textureId
|
|
85
|
+
? `jsvtexturestore://${props.textureInfo.textureId}`
|
|
86
|
+
: "";
|
|
87
|
+
});
|
|
88
|
+
const translateTransform = computed(() => {
|
|
89
|
+
const leftPercent =
|
|
90
|
+
((-props.showRectPos.left -
|
|
91
|
+
(props.layout.width - props.textureInfo.width) / 2) /
|
|
92
|
+
props.layout.width) *
|
|
93
|
+
100;
|
|
94
|
+
const topPercent =
|
|
95
|
+
((-props.showRectPos.top -
|
|
96
|
+
(props.layout.height - props.textureInfo.height) / 2) /
|
|
97
|
+
props.layout.height) *
|
|
98
|
+
100;
|
|
99
|
+
const xScale = props.textureInfo.width / props.layout.width;
|
|
100
|
+
const yScale = props.textureInfo.height / props.layout.height;
|
|
101
|
+
const r = `translate3d(${leftPercent.toFixed(2)}%, ${topPercent.toFixed(2)}%, 0) scale3d(${xScale.toFixed(2)}, ${yScale.toFixed(2)}, 1)`;
|
|
102
|
+
console.log("ccht translateTransform", r);
|
|
103
|
+
return r;
|
|
104
|
+
});
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<script>
|
|
108
|
+
import { JsvTextureStoreApi, CaptureProcessType } from "jsview";
|
|
109
|
+
/**
|
|
110
|
+
* @description 捕获模糊纹理
|
|
111
|
+
* @param {HTMLElement} divRef - 要捕获的DOM元素引用
|
|
112
|
+
* @param {number} blurRadius - 模糊半径
|
|
113
|
+
* @returns {Promise<Object>} 返回包含纹理信息的Promise
|
|
114
|
+
* @property {string} textureId - 捕获的纹理ID
|
|
115
|
+
* @property {number} width - 纹理宽度
|
|
116
|
+
* @property {number} height - 纹理高度
|
|
117
|
+
*/
|
|
118
|
+
export function captureBlurTexture(divRef, blurRadius) {
|
|
119
|
+
return new Promise((resolve, reject) => {
|
|
120
|
+
try {
|
|
121
|
+
JsvTextureStoreApi.capture2Texture(
|
|
122
|
+
divRef,
|
|
123
|
+
(textureName, autoRecycle, w, h) => {
|
|
124
|
+
console.log("captureBlurTexture", textureName, autoRecycle, w, h);
|
|
125
|
+
if (textureName) {
|
|
126
|
+
resolve({
|
|
127
|
+
textureId: textureName,
|
|
128
|
+
width: w,
|
|
129
|
+
height: h,
|
|
130
|
+
});
|
|
131
|
+
} else {
|
|
132
|
+
reject(new Error("Failed to capture texture"));
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
true,
|
|
136
|
+
{
|
|
137
|
+
type: CaptureProcessType.Blur,
|
|
138
|
+
radius: blurRadius,
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
} catch (error) {
|
|
142
|
+
reject(error);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
</script>
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { shallowRef, onBeforeUnmount } from "vue";
|
|
3
|
+
import Blur, { captureBlurTexture } from "../Blur.vue";
|
|
4
|
+
import StaticBgSlide from "./StaticBgSlide.vue";
|
|
5
|
+
|
|
6
|
+
const rToCapture = shallowRef(null);
|
|
7
|
+
const rTextureInfo = shallowRef(null);
|
|
8
|
+
const rTriggerLoadKey = shallowRef(0);
|
|
9
|
+
|
|
10
|
+
let isBlur = false;
|
|
11
|
+
|
|
12
|
+
// 要确认图片完成显示时再进行捕获并处理成模糊纹理
|
|
13
|
+
function handleLoadDone() {
|
|
14
|
+
if (isBlur) {
|
|
15
|
+
console.log("start captureBlurTexture");
|
|
16
|
+
captureBlurTexture(rToCapture.value, 12).then((textureInfo) => {
|
|
17
|
+
rTextureInfo.value = textureInfo;
|
|
18
|
+
console.log("done captureBlurTexture");
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
curPosition.left = 0;
|
|
21
|
+
rBgAnim.value?.slide(curPosition);
|
|
22
|
+
}, 0);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function enableBlur() {
|
|
28
|
+
if (isBlur) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
isBlur = true;
|
|
32
|
+
// 触发图片加载,然后捕获模糊纹理
|
|
33
|
+
rTriggerLoadKey.value++;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const ImagePanda =
|
|
37
|
+
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/CustomShader/App/panda.jpeg";
|
|
38
|
+
|
|
39
|
+
let curPosition = {
|
|
40
|
+
left: 0,
|
|
41
|
+
top: 0,
|
|
42
|
+
};
|
|
43
|
+
let width1 = 300;
|
|
44
|
+
let height1 = 720;
|
|
45
|
+
const rBgAnim = shallowRef(null);
|
|
46
|
+
const onKeyDown = (ev) => {
|
|
47
|
+
console.log("ccht", ev.keyCode);
|
|
48
|
+
switch (ev.keyCode) {
|
|
49
|
+
case 37:
|
|
50
|
+
if (isBlur) {
|
|
51
|
+
curPosition.left = -width1;
|
|
52
|
+
rBgAnim.value?.slide(curPosition);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
break;
|
|
56
|
+
case 39:
|
|
57
|
+
if (isBlur) {
|
|
58
|
+
curPosition.left = 0;
|
|
59
|
+
rBgAnim.value?.slide(curPosition);
|
|
60
|
+
} else {
|
|
61
|
+
enableBlur();
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
// case 38:
|
|
65
|
+
// curPosition.top = curPosition.top - 100;
|
|
66
|
+
// rBgAnim.value?.slide(curPosition);
|
|
67
|
+
// break;
|
|
68
|
+
// case 40:
|
|
69
|
+
// curPosition.top = curPosition.top + 100;
|
|
70
|
+
// rBgAnim.value?.slide(curPosition);
|
|
71
|
+
// break;
|
|
72
|
+
// case 13:
|
|
73
|
+
// enableBlur();
|
|
74
|
+
// break;
|
|
75
|
+
default:
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const cVisibleCallback = (info) => {
|
|
81
|
+
console.log("onVisibilityChange", info);
|
|
82
|
+
if (info.status == "show") {
|
|
83
|
+
rTriggerLoadKey.value++; // 刷新img标签, 触发onload后的重新捕获模糊纹理
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
// 为了应对 window.JsvCoreApi.delayRemoveGLView/ window.JsvCoreApi.restoreGLView 对应的GL重建处理后,
|
|
88
|
+
// 需要重新捕获模糊纹理的场景
|
|
89
|
+
window.JsvCoreApi.onVisibilityChange(cVisibleCallback);
|
|
90
|
+
|
|
91
|
+
onBeforeUnmount(() => {
|
|
92
|
+
// 取消注册一定不要漏
|
|
93
|
+
window.JsvCoreApi.removeEventCallback(cVisibleCallback);
|
|
94
|
+
});
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<template>
|
|
98
|
+
<jsv-focus-block
|
|
99
|
+
autoFocus
|
|
100
|
+
:onAction="{
|
|
101
|
+
onKeyDown: onKeyDown,
|
|
102
|
+
}"
|
|
103
|
+
>
|
|
104
|
+
<div
|
|
105
|
+
ref="rToCapture"
|
|
106
|
+
:style="{
|
|
107
|
+
width: 1280, // 截屏区域的宽
|
|
108
|
+
height: 720, // 截屏区域的高
|
|
109
|
+
}"
|
|
110
|
+
>
|
|
111
|
+
<img
|
|
112
|
+
:key="rTriggerLoadKey"
|
|
113
|
+
:src="ImagePanda"
|
|
114
|
+
:style="{
|
|
115
|
+
width: 1280,
|
|
116
|
+
height: 720,
|
|
117
|
+
}"
|
|
118
|
+
:onLoad="handleLoadDone"
|
|
119
|
+
/>
|
|
120
|
+
<div
|
|
121
|
+
:style="{
|
|
122
|
+
top: 300,
|
|
123
|
+
width: 1280,
|
|
124
|
+
// height: 81,
|
|
125
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
126
|
+
color: '#ffffff',
|
|
127
|
+
// fontSize: 68,
|
|
128
|
+
textAlign: 'center',
|
|
129
|
+
// lineHeight: 81,
|
|
130
|
+
|
|
131
|
+
height: 38,
|
|
132
|
+
lineHeight: 38,
|
|
133
|
+
fontSize: 36,
|
|
134
|
+
fontWeight: 'bold',
|
|
135
|
+
}"
|
|
136
|
+
>
|
|
137
|
+
左右键展开/隐藏面板
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<div v-if="rTextureInfo">
|
|
142
|
+
<StaticBgSlide
|
|
143
|
+
key="bg"
|
|
144
|
+
ref="rBgAnim"
|
|
145
|
+
:imgUrl="`jsvtexturestore://${rTextureInfo.textureId}`"
|
|
146
|
+
:width="width1"
|
|
147
|
+
:height="height1"
|
|
148
|
+
:bgWidth="1280"
|
|
149
|
+
:bgHeight="720"
|
|
150
|
+
:borderRadius="'0 30 30 0'"
|
|
151
|
+
:initPosition="{
|
|
152
|
+
left: -width1,
|
|
153
|
+
top: 0,
|
|
154
|
+
}"
|
|
155
|
+
>
|
|
156
|
+
<div
|
|
157
|
+
:style="{
|
|
158
|
+
width: width1,
|
|
159
|
+
height: height1,
|
|
160
|
+
backgroundColor: 'rgba(0, 0, 0, 0.3)',
|
|
161
|
+
borderRadius: '0 30 30 0',
|
|
162
|
+
lineHeight: height1,
|
|
163
|
+
textAlign: 'center',
|
|
164
|
+
color: '#ffffff',
|
|
165
|
+
fontSize: 40,
|
|
166
|
+
}"
|
|
167
|
+
>
|
|
168
|
+
弹窗内容
|
|
169
|
+
</div>
|
|
170
|
+
</StaticBgSlide>
|
|
171
|
+
</div>
|
|
172
|
+
</jsv-focus-block>
|
|
173
|
+
</template>
|
|
174
|
+
|
|
175
|
+
<style>
|
|
176
|
+
@keyframes rotate {
|
|
177
|
+
0% {
|
|
178
|
+
transform: rotate3d(0, 0, 1, 0deg);
|
|
179
|
+
}
|
|
180
|
+
100% {
|
|
181
|
+
transform: rotate3d(0, 0, 1, 360deg);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
</style>
|