@shijiu/jsview-vue-samples 2.2.426-test.0 → 2.3.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/BakeViewDemo/AnimatePic.vue +1 -1
- package/Basic/components/text/TextDirection.vue +7 -1
- package/BasicFocusControl/components/BaseBlock.vue +65 -18
- package/BreakRender/assets/imageList.json +235 -235
- package/ColorSpace/App.vue +2 -2
- package/CoupletsTest/App.vue +1 -1
- package/CoupletsTest/widget/Banger/Banger.vue +3 -3
- package/CoupletsTest/widget/Banger/MaroonLoader.vue +5 -5
- package/CoupletsTest/widget/Couplets/Couplets.vue +4 -4
- package/CoupletsTest/widget/Fireworks/Fireworks.vue +13 -13
- package/CustomShader/App.vue +4 -4
- package/CustomShader/gaussianBlur.glsl +1 -1
- package/DashPath/App.vue +79 -0
- package/DashPath/AppForOperator.vue +35 -0
- package/DashPath/DashPath.vue +118 -0
- package/DemoForOperator/AnimPic/AnimPic.vue +47 -0
- package/DemoForOperator/AnimPic/App.vue +28 -0
- package/DemoForOperator/Banger/App.vue +26 -0
- package/DemoForOperator/Banger/Banger/Banger.vue +252 -0
- package/DemoForOperator/Banger/Banger/Maroon.vue +123 -0
- package/DemoForOperator/Banger/Banger/MaroonLoader.vue +78 -0
- package/DemoForOperator/Banger/Banger/SpriteDeal.js +30 -0
- package/DemoForOperator/Bounce/App.vue +43 -0
- package/DemoForOperator/Bounce/Bounce.vue +49 -0
- package/DemoForOperator/Bounce/FreeMoveBuilder.js +139 -0
- package/DemoForOperator/ChunLian/App.vue +47 -0
- package/DemoForOperator/ChunLian/Couplets.vue +248 -0
- package/DemoForOperator/EpisodeList/App.vue +80 -0
- package/DemoForOperator/EpisodeList/EpisodeList/Controller.vue +113 -0
- package/DemoForOperator/EpisodeList/EpisodeList/EpisodeList.vue +176 -0
- package/DemoForOperator/EpisodeList/GroupItem.vue +65 -0
- package/DemoForOperator/EpisodeList/ListItem.vue +48 -0
- package/DemoForOperator/Firework1/App.vue +25 -0
- package/DemoForOperator/Firework1/Fireworks.vue +358 -0
- package/DemoForOperator/Firework1/SpriteDeal.js +30 -0
- package/DemoForOperator/FlipPage/App.vue +75 -0
- package/DemoForOperator/FlipPage/FlipPage/FlipPage.vue +150 -0
- package/DemoForOperator/FlipPage/FlipPage/flipIn.glsl +41 -0
- package/DemoForOperator/FlipPage/FlipPage/flipOut.glsl +41 -0
- package/DemoForOperator/Focus/Alpha/AlphaFocusBox.vue +70 -0
- package/DemoForOperator/Focus/Alpha/AlphaPage.vue +40 -0
- package/DemoForOperator/Focus/Alpha/Item.vue +64 -0
- package/DemoForOperator/Focus/App.vue +124 -0
- package/DemoForOperator/Focus/CommonPageSetting.js +30 -0
- package/DemoForOperator/Focus/Item.vue +46 -0
- package/DemoForOperator/Focus/Light/Item.vue +67 -0
- package/DemoForOperator/Focus/Light/LightFocusBox.vue +46 -0
- package/DemoForOperator/Focus/Light/LightPage.vue +43 -0
- package/DemoForOperator/Focus/Light/utils/FrameCanvasStore.ts +68 -0
- package/DemoForOperator/Focus/Light/utils/RotateFrame.vue +146 -0
- package/DemoForOperator/Focus/Light/utils/circleHaloMask.png +0 -0
- package/DemoForOperator/Focus/Normal/Item.vue +64 -0
- package/DemoForOperator/Focus/Normal/NormalFocusBox.vue +53 -0
- package/DemoForOperator/Focus/Normal/NormalPage.vue +41 -0
- package/DemoForOperator/Focus/SwipeLight/Item.vue +73 -0
- package/DemoForOperator/Focus/SwipeLight/SwipeLightBox.vue +62 -0
- package/DemoForOperator/Focus/SwipeLight/SwipeLightPage.vue +44 -0
- package/DemoForOperator/FullscreenIn/App.vue +105 -0
- package/DemoForOperator/FullscreenIn/FullscreenPoster.vue +41 -0
- package/DemoForOperator/FullscreenIn/Item.vue +50 -0
- package/DemoForOperator/Genie/App.vue +78 -0
- package/DemoForOperator/Genie/geniePakcer/Genie.vue +699 -0
- package/DemoForOperator/Genie/geniePakcer/genieBottom.glsl +49 -0
- package/DemoForOperator/Genie/geniePakcer/genieLeft.glsl +50 -0
- package/DemoForOperator/Genie/geniePakcer/genieRight.glsl +57 -0
- package/DemoForOperator/Genie/geniePakcer/genieTop.glsl +50 -0
- package/DemoForOperator/GrayFilter/App.vue +51 -0
- package/DemoForOperator/GrayFilter/GrayFilter.vue +38 -0
- package/DemoForOperator/Jigsaw/App.vue +45 -0
- package/DemoForOperator/Jigsaw/JigsawFull.vue +100 -0
- package/DemoForOperator/Jigsaw/JigsawSingle.vue +86 -0
- package/DemoForOperator/Particle/App.vue +69 -0
- package/DemoForOperator/Particle/Drop/DropParticle.vue +176 -0
- package/DemoForOperator/Particle/Explode/ExplodeParticle.vue +99 -0
- package/DemoForOperator/PosterAnim/App.vue +125 -0
- package/DemoForOperator/PosterAnim/Bounce/BouncePage.vue +54 -0
- package/DemoForOperator/PosterAnim/Bounce/Item.vue +85 -0
- package/DemoForOperator/PosterAnim/Breath/BreathPage.vue +47 -0
- package/DemoForOperator/PosterAnim/Breath/Item.vue +58 -0
- package/DemoForOperator/PosterAnim/CommonPageSetting.js +30 -0
- package/DemoForOperator/PosterAnim/Item.vue +46 -0
- package/DemoForOperator/PosterAnim/PosterAnim.js +58 -0
- package/DemoForOperator/PosterAnim/Scale/Item.vue +72 -0
- package/DemoForOperator/PosterAnim/Scale/ScalePage.vue +48 -0
- package/DemoForOperator/PosterAnim/Shake/Item.vue +85 -0
- package/DemoForOperator/PosterAnim/Shake/ShakePage.vue +53 -0
- package/DemoForOperator/PosterOverflow/App.vue +116 -0
- package/DemoForOperator/PosterOverflow/Item.vue +67 -0
- package/DemoForOperator/PosterOverflow/PosterOverflow.vue +23 -0
- package/DemoForOperator/Ripple/App.vue +54 -0
- package/DemoForOperator/Ripple/Ripple.vue +50 -0
- package/DemoForOperator/ScalePoster/App.vue +4 -0
- package/DemoForOperator/ScalePoster/ScalePoster.vue +0 -0
- package/DemoForOperator/Sprite/App.vue +33 -0
- package/DemoForOperator/Sprite/Sprite.vue +90 -0
- package/DemoForOperator/Stretch/App.vue +103 -0
- package/DemoForOperator/Stretch/Stretch/Item.vue +192 -0
- package/DemoForOperator/Stretch/Stretch/Stretch.vue +168 -0
- package/DemoForOperator/TabContent/App.vue +89 -0
- package/DemoForOperator/TabContent/ContentPage.vue +66 -0
- package/DemoForOperator/TabContent/Item.vue +85 -0
- package/DemoForOperator/TabContent/PageItem.vue +40 -0
- package/DemoForOperator/TabContent/TabContent/CreepFocus.vue +160 -0
- package/DemoForOperator/TabContent/TabContent/Item.vue +63 -0
- package/DemoForOperator/TabContent/TabContent/TabContent.vue +146 -0
- package/DemoForOperator/TabContent/TabContent/TabItem.vue +368 -0
- package/DemoForOperator/TabContent/TabContent/TabWidget.vue +243 -0
- package/DemoForOperator/TabContent/TabContent/Util.js +3 -0
- package/DemoForOperator/TabContent/TabContent/ViewSwiper.vue +110 -0
- package/DemoForOperator/TabContent/testData.js +241 -0
- package/DemoForOperator/Vortex/App.vue +78 -0
- package/DemoForOperator/Vortex/Vortex/Vortex.vue +154 -0
- package/DemoForOperator/Vortex/Vortex/vortexIn.glsl +38 -0
- package/DemoForOperator/Vortex/Vortex/vortexOut.glsl +38 -0
- package/DemoForOperator/index.js +6 -0
- package/DemoForOperator/routeList.js +142 -0
- package/DemoHomepage/App.vue +50 -30
- package/DemoHomepage/components/Dialog.vue +1 -0
- package/DemoHomepage/components/TabFrame.vue +7 -0
- package/DemoHomepage/router.js +104 -81
- package/DemoHomepage/views/Homepage.vue +7 -2
- package/DivMetroPerformance/data.js +3 -3
- package/DriftScopeTest/App.vue +1 -1
- package/FilterDemo/AnimatePic.vue +1 -1
- package/FilterDemo/VideoLayer.vue +2 -2
- package/FullScreenFlex/TestFrame2.vue +1 -1
- package/GiftRain/App.vue +12 -12
- package/JsvPreDownloader/App.vue +4 -4
- package/MediaDemo/components/frames/AudioFrame.vue +1 -1
- package/MediaDemo/components/frames/VideoFrame.vue +1 -1
- package/MetroWidgetDemos/MassiveItems/ContentItem.vue +1 -1
- package/MetroWidgetDemos/MassiveItems/data.js +1 -1
- package/MetroWidgetDemos/PerformanceTest/data.js +3 -3
- package/MetroWidgetDemos/RefreshDemo/assets/imageList.json +235 -235
- package/MetroWidgetDemos/SkeletonDiagram/assets/imageList.json +235 -235
- package/MetroWidgetDemos/focusableItemMetroWidget/WidgetItem.vue +3 -1
- package/MetroWidgetDemos/routeList.js +17 -17
- package/Poster3d/App.vue +69 -0
- package/Poster3d/Poster3d.vue +92 -0
- package/PosterPacker/App.vue +3 -3
- package/PosterPacker/tools/vortexPacker/Vortex.vue +1 -1
- package/QrcodeDemo/App.vue +1 -1
- package/Ripple/App.vue +1 -1
- package/ScaleDownNeon/App.vue +4 -4
- package/SceneTransition/App.vue +2 -2
- package/SceneTransition/maskConfig/config2.js +12 -12
- package/SceneTransition/maskConfig/config3.js +14 -14
- package/SprayView/App.vue +96 -51
- package/SpringFestival/App.vue +73 -0
- package/SpringFestival/SpringFestivalScene/ChunLian.vue +211 -0
- package/SpringFestival/SpringFestivalScene/FreeMoveBuilder.js +139 -0
- package/SpringFestival/SpringFestivalScene/LanternAnim.js +60 -0
- package/SpringFestival/SpringFestivalScene/Rain.vue +137 -0
- package/SpringFestival/SpringFestivalScene/Scene.vue +218 -0
- package/SpringFestival/SpringFestivalScene/imageConfig.js +87 -0
- package/SpringFestival/SpringFestivalScene/index.js +1 -0
- package/Swiper/App.vue +28 -29
- package/Swiper/Item.vue +19 -0
- package/SwiperTest/App.vue +9 -9
- package/TestNativeSharedView/AckEventDefine.ts +82 -0
- package/TestNativeSharedView/App.vue +4 -6
- package/TestNativeSharedView/JsvDemoTester.js +131 -0
- package/TextureAnimation/App.vue +16 -6
- package/TextureAnimation/App3.vue +100 -0
- package/TextureAnimation/utils/FrameCanvasStore.ts +68 -0
- package/TextureAnimation/utils/RotateFrame.vue +146 -0
- package/TextureAnimation/utils/circleHaloMask.png +0 -0
- package/TombSweepingDayTest/Raining/RainScene.vue +4 -4
- package/ViewOpacity/App.vue +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2023-03-08 14:52:08
|
|
4
|
+
* @Description: file content
|
|
5
|
+
-->
|
|
6
|
+
<script setup>
|
|
7
|
+
import { MetroWidget, HORIZONTAL, useFocusHub } from "jsview";
|
|
8
|
+
import Item from "./Item.vue";
|
|
9
|
+
import { onMounted, ref } from "vue";
|
|
10
|
+
import FullscreenPoster from "./FullscreenPoster.vue";
|
|
11
|
+
import { provide } from "vue";
|
|
12
|
+
|
|
13
|
+
const focusHub = useFocusHub();
|
|
14
|
+
|
|
15
|
+
const imageUrl =
|
|
16
|
+
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/DemoForOperator/FullscreenPoster/App/element_228475_icon2_20230608194600.png";
|
|
17
|
+
|
|
18
|
+
const fullScreenVisibility = ref(false);
|
|
19
|
+
provide("fullScreenVisibility", fullScreenVisibility)
|
|
20
|
+
|
|
21
|
+
const data = [
|
|
22
|
+
{
|
|
23
|
+
width: 100,
|
|
24
|
+
height: 190,
|
|
25
|
+
marginRight: 10,
|
|
26
|
+
marginBottom: 10,
|
|
27
|
+
color: "#AABB33",
|
|
28
|
+
content: 0,
|
|
29
|
+
showFull: false,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
width: 200,
|
|
33
|
+
height: 190,
|
|
34
|
+
marginRight: 10,
|
|
35
|
+
marginBottom: 10,
|
|
36
|
+
color: "#0077AA",
|
|
37
|
+
content: "显示霸屏",
|
|
38
|
+
showFull: true,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
width: 100,
|
|
42
|
+
height: 190,
|
|
43
|
+
marginRight: 10,
|
|
44
|
+
marginBottom: 10,
|
|
45
|
+
color: "#BB00AA",
|
|
46
|
+
showFull: false,
|
|
47
|
+
content: 2,
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
const provideData = () => {
|
|
51
|
+
return data;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const measures = (data) => {
|
|
55
|
+
return {
|
|
56
|
+
width: data.width,
|
|
57
|
+
height: data.height,
|
|
58
|
+
marginRight: data.marginRight,
|
|
59
|
+
marginBottom: data.marginBottom,
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const widgetLayout = {
|
|
64
|
+
left: 400,
|
|
65
|
+
top: 50,
|
|
66
|
+
width: 500,
|
|
67
|
+
height: 300,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
onMounted(() => {
|
|
71
|
+
//组件mount后设置焦点
|
|
72
|
+
focusHub.setFocus("mainMw");
|
|
73
|
+
});
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<template>
|
|
77
|
+
<div
|
|
78
|
+
:style="{
|
|
79
|
+
width: 1280,
|
|
80
|
+
height: 720,
|
|
81
|
+
backgroundColor: '#007788',
|
|
82
|
+
}"
|
|
83
|
+
/>
|
|
84
|
+
<metro-widget
|
|
85
|
+
name="mainMw"
|
|
86
|
+
:left="widgetLayout.left"
|
|
87
|
+
:top="widgetLayout.top"
|
|
88
|
+
:width="widgetLayout.width"
|
|
89
|
+
:height="widgetLayout.height"
|
|
90
|
+
:provideData="provideData"
|
|
91
|
+
:direction="HORIZONTAL"
|
|
92
|
+
:measures="measures"
|
|
93
|
+
>
|
|
94
|
+
<template #renderItem="{ data, onAction }">
|
|
95
|
+
<item :data="data" :onAction="onAction" />
|
|
96
|
+
</template>
|
|
97
|
+
</metro-widget>
|
|
98
|
+
|
|
99
|
+
<fullscreen-poster
|
|
100
|
+
v-if="fullScreenVisibility"
|
|
101
|
+
:src="imageUrl"
|
|
102
|
+
:width="1280"
|
|
103
|
+
:duration="800"
|
|
104
|
+
></fullscreen-poster>
|
|
105
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<img
|
|
3
|
+
:src="src"
|
|
4
|
+
:style="{
|
|
5
|
+
width: width,
|
|
6
|
+
animation: animStr,
|
|
7
|
+
}"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script setup>
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
src: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
duration: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 800,
|
|
20
|
+
},
|
|
21
|
+
width: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const animStr = `fade-in ${props.duration / 1000}s`;
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<style scopped>
|
|
31
|
+
@keyframes fade-in {
|
|
32
|
+
from {
|
|
33
|
+
opacity: 0;
|
|
34
|
+
top: -150;
|
|
35
|
+
}
|
|
36
|
+
to {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
top: 0
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2023-03-08 14:52:17
|
|
4
|
+
* @Description: file content
|
|
5
|
+
-->
|
|
6
|
+
<script setup>
|
|
7
|
+
import { inject, ref } from "vue";
|
|
8
|
+
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
data: Object,
|
|
11
|
+
onAction: Object,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const focused = ref(false);
|
|
15
|
+
const fullScreenVisibility = inject("fullScreenVisibility");
|
|
16
|
+
|
|
17
|
+
// 注册回调
|
|
18
|
+
const onFocus = () => {
|
|
19
|
+
focused.value = true;
|
|
20
|
+
if (props.data.showFull) {
|
|
21
|
+
fullScreenVisibility.value = true;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const onBlur = () => {
|
|
25
|
+
focused.value = false;
|
|
26
|
+
if (props.data.showFull) {
|
|
27
|
+
fullScreenVisibility.value = false;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const onClick = () => {
|
|
31
|
+
console.log("item onclick ", props.data);
|
|
32
|
+
};
|
|
33
|
+
props.onAction.register("onFocus", onFocus);
|
|
34
|
+
props.onAction.register("onBlur", onBlur);
|
|
35
|
+
props.onAction.register("onClick", onClick);
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<div
|
|
40
|
+
:style="{
|
|
41
|
+
width: data.width,
|
|
42
|
+
height: data.height,
|
|
43
|
+
fontSize: 30,
|
|
44
|
+
color: focused ? '#FF0000' : '#FFFFFF',
|
|
45
|
+
backgroundColor: data.color,
|
|
46
|
+
}"
|
|
47
|
+
>
|
|
48
|
+
{{ data.content }}
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :style="{ width: 1280, height: 720, backgroundColor: '#f5f57d' }"></div>
|
|
3
|
+
<jsv-focus-block
|
|
4
|
+
autoFocus
|
|
5
|
+
:onAction="{
|
|
6
|
+
onKeyDown,
|
|
7
|
+
}"
|
|
8
|
+
>
|
|
9
|
+
<Genie
|
|
10
|
+
ref="cGenieRef"
|
|
11
|
+
:width="width"
|
|
12
|
+
:height="height"
|
|
13
|
+
:left="128"
|
|
14
|
+
:top="72"
|
|
15
|
+
direction="horizontal"
|
|
16
|
+
:position="position"
|
|
17
|
+
:time="1"
|
|
18
|
+
:onAnimEnd="onAnimEnd"
|
|
19
|
+
:initShow="true"
|
|
20
|
+
>
|
|
21
|
+
<img
|
|
22
|
+
:src="`url(${imageUrl})`"
|
|
23
|
+
:style="{
|
|
24
|
+
width: width,
|
|
25
|
+
height: height,
|
|
26
|
+
}"
|
|
27
|
+
@load="onImgLoaded"
|
|
28
|
+
/>
|
|
29
|
+
<div
|
|
30
|
+
:style="{
|
|
31
|
+
width: 1024,
|
|
32
|
+
height: 100,
|
|
33
|
+
backgroundColor: '#ffffff44',
|
|
34
|
+
}"
|
|
35
|
+
></div>
|
|
36
|
+
<div
|
|
37
|
+
:style="{
|
|
38
|
+
width: width,
|
|
39
|
+
height: height,
|
|
40
|
+
fontSize: 50,
|
|
41
|
+
color: '#fff',
|
|
42
|
+
textAlign: 'center',
|
|
43
|
+
}"
|
|
44
|
+
>
|
|
45
|
+
按OK键进场/出场
|
|
46
|
+
</div>
|
|
47
|
+
</Genie>
|
|
48
|
+
</jsv-focus-block>
|
|
49
|
+
</template>
|
|
50
|
+
<script setup>
|
|
51
|
+
import Genie from "./geniePakcer/Genie.vue";
|
|
52
|
+
import { shallowRef } from "vue";
|
|
53
|
+
|
|
54
|
+
const cGenieRef = shallowRef();
|
|
55
|
+
const position = { x: -80, y: 600 };
|
|
56
|
+
const width = 1024;
|
|
57
|
+
const height = 576;
|
|
58
|
+
const imageUrl =
|
|
59
|
+
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/DemoForOperator/Genie/App/element_228542_icon_20230610184253.jpg";
|
|
60
|
+
|
|
61
|
+
let imgLoaded = false;
|
|
62
|
+
function onImgLoaded() {
|
|
63
|
+
imgLoaded = true;
|
|
64
|
+
}
|
|
65
|
+
const onAnimEnd = () => {
|
|
66
|
+
console.log("anim end");
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
function onKeyDown(ev) {
|
|
70
|
+
if (ev.keyCode == 13) {
|
|
71
|
+
if (imgLoaded) {
|
|
72
|
+
cGenieRef.value.switcher();
|
|
73
|
+
}
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
</script>
|