@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
|
@@ -40,10 +40,12 @@ const onFocus = (rect) => {
|
|
|
40
40
|
* 因此需要调用setEnterFocusRect来设置焦点进入区域, 以寻找最近的焦点
|
|
41
41
|
*/
|
|
42
42
|
mwRef.value?.setEnterFocusRect(rect);
|
|
43
|
+
/** 重要代码: 子节点的获焦必须在往 onAction 注册的 onFocus中调用, 否则父MetroWidget不知道当前真正获焦的 item 是哪一个
|
|
44
|
+
*/
|
|
43
45
|
focusHub.setFocus(props.data.name);
|
|
44
46
|
};
|
|
45
47
|
const onBlur = () => {
|
|
46
|
-
|
|
48
|
+
/** 重要代码: onBlur时需要返还焦点给父MetroWidget */
|
|
47
49
|
focusHub.returnFocusToParent();
|
|
48
50
|
};
|
|
49
51
|
|
|
@@ -5,95 +5,95 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export default [
|
|
7
7
|
{
|
|
8
|
-
|
|
8
|
+
meta: { nameText: "基础示例", },
|
|
9
9
|
path: "/metroWidget/basic",
|
|
10
10
|
component: () => import("@shijiu/jsview-vue-samples/MetroWidgetDemos/basic/App.vue"),
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
|
-
|
|
13
|
+
meta: { nameText: "direction", },
|
|
14
14
|
path: "/metroWidget/direction",
|
|
15
15
|
component: () => import("@shijiu/jsview-vue-samples/MetroWidgetDemos/direction/App.vue"),
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
|
|
18
|
+
meta: { nameText: "padding", },
|
|
19
19
|
path: "/metroWidget/padding",
|
|
20
20
|
component: () => import("@shijiu/jsview-vue-samples/MetroWidgetDemos/padding/App.vue"),
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
|
|
23
|
+
meta: { nameText: "slideSetting", },
|
|
24
24
|
path: "/metroWidget/slideSetting",
|
|
25
25
|
component: () => import("@shijiu/jsview-vue-samples/MetroWidgetDemos/slideSetting/App.vue"),
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
|
|
28
|
+
meta: { nameText: "layoutType", },
|
|
29
29
|
path: "/metroWidget/layoutType",
|
|
30
30
|
component: () => import("@shijiu/jsview-vue-samples/MetroWidgetDemos/layoutType/App.vue"),
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
|
|
33
|
+
meta: { nameText: "嵌套(基础)", },
|
|
34
34
|
path: "/metroWidget/focusableItemBasic",
|
|
35
35
|
component: () => import("@shijiu/jsview-vue-samples/MetroWidgetDemos/focusableItemBasic/App.vue"),
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
|
|
38
|
+
meta: { nameText: "嵌套(混合)", },
|
|
39
39
|
path: "/metroWidget/focusableItemMix",
|
|
40
40
|
component: () => import("@shijiu/jsview-vue-samples/MetroWidgetDemos/focusableItemMix/App.vue"),
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
|
|
43
|
+
meta: { nameText: "嵌套(MetroWidget)", },
|
|
44
44
|
path: "/metroWidget/focusableItemMetroWidget",
|
|
45
45
|
component: () => import("@shijiu/jsview-vue-samples/MetroWidgetDemos/focusableItemMetroWidget/App.vue"),
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
|
-
|
|
48
|
+
meta: { nameText: "乒乓模式", },
|
|
49
49
|
path: "/metroWidget/PingPong",
|
|
50
50
|
component: () =>
|
|
51
51
|
import("@shijiu/jsview-vue-samples/MetroWidgetDemos/PingPong/App.vue"),
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
|
|
54
|
+
meta: { nameText: "性能测试", },
|
|
55
55
|
path: "/metroWidget/PerformanceTest",
|
|
56
56
|
component: () =>
|
|
57
57
|
import("@shijiu/jsview-vue-samples/MetroWidgetDemos/PerformanceTest/App.vue"),
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
|
|
60
|
+
meta: { nameText: "骨架图", },
|
|
61
61
|
path: "/metroWidget/SkeletonDiagram",
|
|
62
62
|
component: () =>
|
|
63
63
|
import("@shijiu/jsview-vue-samples/MetroWidgetDemos/SkeletonDiagram/App.vue"),
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
|
-
|
|
66
|
+
meta: { nameText: ".9焦点页面", },
|
|
67
67
|
path: "/metroWidget/ninePatchFocusPage",
|
|
68
68
|
component: () =>
|
|
69
69
|
import("@shijiu/jsview-vue-samples/MetroWidgetDemos/ninePatchFocusPage/App.vue"),
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
|
-
|
|
72
|
+
meta: { nameText: "item尺寸更新", },
|
|
73
73
|
path: "/metroWidget/itemSizeUpdate",
|
|
74
74
|
component: () =>
|
|
75
75
|
import("@shijiu/jsview-vue-samples/MetroWidgetDemos/itemSizeUpdate/App.vue"),
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
|
-
|
|
78
|
+
meta: { nameText: "三层嵌套", },
|
|
79
79
|
path: "/metroWidget/TripleWidget",
|
|
80
80
|
component: () =>
|
|
81
81
|
import("@shijiu/jsview-vue-samples/MetroWidgetDemos/TripleWidget/App.vue"),
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
|
|
84
|
+
meta: { nameText: "数据刷新demo", },
|
|
85
85
|
path: "/metroWidget/RefreshDemo",
|
|
86
86
|
component: () =>
|
|
87
87
|
import("@shijiu/jsview-vue-samples/MetroWidgetDemos/RefreshDemo/App.vue"),
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
|
-
|
|
90
|
+
meta: { nameText: "剧集翻页", },
|
|
91
91
|
path: "/metroWidget/SeamlessSlide",
|
|
92
92
|
component: () =>
|
|
93
93
|
import("@shijiu/jsview-vue-samples/MetroWidgetDemos/SeamlessSlide/App.vue"),
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
|
-
|
|
96
|
+
meta: { nameText: "多item分段显示", },
|
|
97
97
|
path: "/metroWidget/MassiveItems",
|
|
98
98
|
component: () =>
|
|
99
99
|
import("@shijiu/jsview-vue-samples/MetroWidgetDemos/MassiveItems/App.vue"),
|
package/Poster3d/App.vue
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Jsv3dStage :style="{ width: 1280, height: 720 }" :perspective="700">
|
|
3
|
+
<Poster3d
|
|
4
|
+
:position="rPosition"
|
|
5
|
+
:style="cStyle"
|
|
6
|
+
:divStyle="{ width: 400, height: 200 }"
|
|
7
|
+
>
|
|
8
|
+
<Jsv3dDiv
|
|
9
|
+
v-for="(item, index) in cSrcImgArray"
|
|
10
|
+
:style="{
|
|
11
|
+
width: 100,
|
|
12
|
+
height: 200,
|
|
13
|
+
left: index * 130 + 20,
|
|
14
|
+
backgroundImage: item,
|
|
15
|
+
}"
|
|
16
|
+
></Jsv3dDiv>
|
|
17
|
+
</Poster3d>
|
|
18
|
+
</Jsv3dStage>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
import { Jsv3dStage, Jsv3dDiv } from "jsview";
|
|
23
|
+
import { shallowReactive, onBeforeUnmount } from "vue";
|
|
24
|
+
import Poster3d from "./Poster3d.vue";
|
|
25
|
+
|
|
26
|
+
// 使用到的Jsview组件说明:
|
|
27
|
+
// Jsv3dStage用来创建透视区域,透视区域以中间为3d的消失点, perspective为透视率,默认为1000,约小透视扭曲越明显
|
|
28
|
+
// Jsv3dDiv为解决图片倾斜时的锯齿问题,放入Jsv3dStage的内容,如果可能发生旋转的div请全部使用Jsv3dDiv
|
|
29
|
+
// Jsv3dDiv比div的渲染性能略低, 所以非3d场景,不要习惯性全替换成Jsv3dDiv
|
|
30
|
+
|
|
31
|
+
// Poster3d为应用层样例组件,里面自带类似于tansition的动画功能,可以处理平移和旋转的配置
|
|
32
|
+
|
|
33
|
+
//起始位置和旋转角
|
|
34
|
+
const rPosition = shallowReactive({
|
|
35
|
+
x: 720,
|
|
36
|
+
y: 260,
|
|
37
|
+
rotateY: -30,
|
|
38
|
+
});
|
|
39
|
+
//3d组件的style
|
|
40
|
+
const cStyle = {
|
|
41
|
+
width: 400,
|
|
42
|
+
height: 200,
|
|
43
|
+
};
|
|
44
|
+
//插槽的图片来源数组
|
|
45
|
+
const cSrcImgArray = [
|
|
46
|
+
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/Poster3d/App/element_228120_img_20230522225739.jpg",
|
|
47
|
+
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/Poster3d/App/element_228121_img_20230522225750.jpg",
|
|
48
|
+
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/Poster3d/App/element_228277_img_20230530144223.png",
|
|
49
|
+
];
|
|
50
|
+
//定时器
|
|
51
|
+
let vTimer = { id: -1 };
|
|
52
|
+
let vTimer1 = { id: -1 };
|
|
53
|
+
vTimer.id = setTimeout(() => {
|
|
54
|
+
rPosition.x = 420;
|
|
55
|
+
rPosition.rotateY = 0;
|
|
56
|
+
}, 3000);
|
|
57
|
+
vTimer1.id = setTimeout(() => {
|
|
58
|
+
rPosition.x = 120;
|
|
59
|
+
rPosition.rotateY = 30;
|
|
60
|
+
}, 6000);
|
|
61
|
+
onBeforeUnmount(() => {
|
|
62
|
+
clearTimeout(vTimer.id);
|
|
63
|
+
clearTimeout(vTimer1.id);
|
|
64
|
+
vTimer.id = -1;
|
|
65
|
+
vTimer1.id = -1;
|
|
66
|
+
});
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
/**
|
|
3
|
+
* @file
|
|
4
|
+
*
|
|
5
|
+
* 【模块 export 内容】
|
|
6
|
+
* Poster3D:3d移动动画的组件。
|
|
7
|
+
* props说明:
|
|
8
|
+
* @prop {Object} position 包含x,y,y旋转的初始配置。
|
|
9
|
+
* @prop {Number} animDuration 动画时间,默认1秒
|
|
10
|
+
* @prop {Object} style 组件的width/height
|
|
11
|
+
* @prop {Object} divStyle 提供给jsv3dDiv的宽高
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { shallowRef, watch } from "vue";
|
|
15
|
+
import { Jsv3dDiv, getKeyFramesGroup } from "jsview";
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
position: { require: true, type: Object },
|
|
18
|
+
xRotate: { require: true, type: Number },
|
|
19
|
+
animDuration: { type: Number, default: 1 },
|
|
20
|
+
style: { type: Object, require: true },
|
|
21
|
+
divStyle: { type: Object, require: true },
|
|
22
|
+
});
|
|
23
|
+
const myPosition = {
|
|
24
|
+
x: props.position.x,
|
|
25
|
+
y: props.position.y,
|
|
26
|
+
rotateY: props.position?.rotateY,
|
|
27
|
+
};
|
|
28
|
+
let myAnim = shallowRef("");
|
|
29
|
+
const styleShell = getKeyFramesGroup();
|
|
30
|
+
let aniName = "";
|
|
31
|
+
watch(
|
|
32
|
+
() => props.position,
|
|
33
|
+
(newValue, oldValue) => {
|
|
34
|
+
if (newValue.rotateY !== 0) {
|
|
35
|
+
aniName = `@keyframes go
|
|
36
|
+
{
|
|
37
|
+
from { transform: translate3d(${-(
|
|
38
|
+
newValue.x - myPosition.x
|
|
39
|
+
)},0,0) rotate3d(0,1,0,${-newValue.rotateY}deg); }
|
|
40
|
+
to
|
|
41
|
+
{ transform: translate3d(0,0,0) rotate3d(0,1,0,${0}deg); } }`;
|
|
42
|
+
myAnim.value = `go ${props.animDuration}s`;
|
|
43
|
+
} else {
|
|
44
|
+
aniName = `@keyframes start
|
|
45
|
+
{
|
|
46
|
+
from { transform: translate3d(${-(
|
|
47
|
+
newValue.x - myPosition.x
|
|
48
|
+
)},0,0) rotate3d(0,1,0,${myPosition.rotateY}deg); }
|
|
49
|
+
to
|
|
50
|
+
{ transform: translate3d(0,0,0) rotate3d(0,1,0,${
|
|
51
|
+
newValue.rotateY
|
|
52
|
+
}deg); } }`;
|
|
53
|
+
myAnim.value = `start ${props.animDuration}s`;
|
|
54
|
+
}
|
|
55
|
+
styleShell.insertRule(aniName);
|
|
56
|
+
myPosition.x = newValue.x;
|
|
57
|
+
myPosition.y = newValue.y;
|
|
58
|
+
myPosition.rotateY = newValue?.rotateY;
|
|
59
|
+
},
|
|
60
|
+
{ deep: true }
|
|
61
|
+
);
|
|
62
|
+
const myEnd = () => {
|
|
63
|
+
const containsGo = aniName.includes("go");
|
|
64
|
+
if (containsGo) {
|
|
65
|
+
styleShell?.removeRule("go");
|
|
66
|
+
} else {
|
|
67
|
+
styleShell?.removeRule("start");
|
|
68
|
+
}
|
|
69
|
+
myAnim.value = null;
|
|
70
|
+
};
|
|
71
|
+
</script>
|
|
72
|
+
<template>
|
|
73
|
+
<Jsv3dDiv
|
|
74
|
+
:style="{
|
|
75
|
+
width: props.style.width,
|
|
76
|
+
height: props.style.height,
|
|
77
|
+
left: props.position.x,
|
|
78
|
+
top: props.position.y,
|
|
79
|
+
transform: props.position.rotateY
|
|
80
|
+
? `rotate3d(0,1,0,${props.position.rotateY}deg)`
|
|
81
|
+
: '',
|
|
82
|
+
backgroundColor: '#FF1313',
|
|
83
|
+
animation: myAnim,
|
|
84
|
+
}"
|
|
85
|
+
@animationend="myEnd"
|
|
86
|
+
>
|
|
87
|
+
<Jsv3dDiv :position="props.divStyle">
|
|
88
|
+
<slot></slot>
|
|
89
|
+
</Jsv3dDiv>
|
|
90
|
+
</Jsv3dDiv>
|
|
91
|
+
</template>
|
|
92
|
+
<style scoped></style>
|
package/PosterPacker/App.vue
CHANGED
|
@@ -14,9 +14,9 @@ import purple from "./images/purple.png";
|
|
|
14
14
|
const ImgData = [orange, pink, red, yellowGreen, blue, darkGreen, purple];
|
|
15
15
|
|
|
16
16
|
const ImageChinChilla =
|
|
17
|
-
"https://qcast
|
|
18
|
-
const ImageLandscape = "https://
|
|
19
|
-
const ImageOwl = "https://
|
|
17
|
+
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/PosterPacker/App/BackgroundLongmao.jpg";
|
|
18
|
+
const ImageLandscape = "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/PosterPacker/App/landscape.jpeg";
|
|
19
|
+
const ImageOwl = "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/PosterPacker/App/owl.jpeg";
|
|
20
20
|
//旋涡子组件的引用
|
|
21
21
|
const cChildRef1 = ref(null);
|
|
22
22
|
//genie子组件的引用
|
|
@@ -43,7 +43,7 @@ const props = defineProps({
|
|
|
43
43
|
top: { type: Number, default: 0 },
|
|
44
44
|
});
|
|
45
45
|
//图片
|
|
46
|
-
const ImagePanda = "https://
|
|
46
|
+
const ImagePanda = "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/PosterPacker/tools/vortexPacker/Vortex/panda.jpeg";
|
|
47
47
|
//0-1的x和y的坐标值(初始为x和y的中心点)
|
|
48
48
|
let myX = 0.5;
|
|
49
49
|
let myY = 0.5;
|
package/QrcodeDemo/App.vue
CHANGED
|
@@ -13,7 +13,7 @@ const includeImage = true;
|
|
|
13
13
|
const imageH = 64;
|
|
14
14
|
const imageW = 64;
|
|
15
15
|
const imageSrc =
|
|
16
|
-
"
|
|
16
|
+
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/QrcodeDemo/App/0fdcdc8b258fe7baac16b73f58f8989d.jpg";
|
|
17
17
|
const tipsInfo = `功能:二维码展示可配置项:
|
|
18
18
|
|
|
19
19
|
1.前景色
|
package/Ripple/App.vue
CHANGED
|
@@ -20,7 +20,7 @@ import img from "../assets/jpegDemo.jpeg";
|
|
|
20
20
|
const rippleViewRef = shallowRef(null);
|
|
21
21
|
|
|
22
22
|
const imgUrl =
|
|
23
|
-
"https://qcast
|
|
23
|
+
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/Ripple/App/colorful-blocks.jpg";
|
|
24
24
|
|
|
25
25
|
const genSource = () => {
|
|
26
26
|
return [
|
package/ScaleDownNeon/App.vue
CHANGED
|
@@ -10,13 +10,13 @@ import { useRouter } from "vue-router";
|
|
|
10
10
|
const router = useRouter();
|
|
11
11
|
|
|
12
12
|
const test1 =
|
|
13
|
-
"url(https://qcast
|
|
13
|
+
"url(https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/ScaleDownNeon/App/test_1.jpeg)";
|
|
14
14
|
const test2 =
|
|
15
|
-
"url(https://qcast
|
|
15
|
+
"url(https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/ScaleDownNeon/App/test_2.jpeg)";
|
|
16
16
|
const test3 =
|
|
17
|
-
"url(https://qcast
|
|
17
|
+
"url(https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/ScaleDownNeon/App/test_3.jpeg)";
|
|
18
18
|
const test4 =
|
|
19
|
-
"url(https://qcast
|
|
19
|
+
"url(https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/ScaleDownNeon/App/test_4.jpeg)";
|
|
20
20
|
|
|
21
21
|
const onKeyDown = (ev) => {
|
|
22
22
|
// 8:Backspace, 27:Escape, 10000:盒子返回键
|
package/SceneTransition/App.vue
CHANGED
|
@@ -74,9 +74,9 @@ import { ArraySet2 } from "./maskConfig/config2";
|
|
|
74
74
|
import { ArraySet3 } from "./maskConfig/config3";
|
|
75
75
|
|
|
76
76
|
const fly1 =
|
|
77
|
-
"https://qcast
|
|
77
|
+
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/App/fly1.jpg";
|
|
78
78
|
const fly2 =
|
|
79
|
-
"https://qcast
|
|
79
|
+
"https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/App/fly2.jpg";
|
|
80
80
|
//预加载数组
|
|
81
81
|
const preload_info = [buildPreloadInfo(fly1), buildPreloadInfo(fly2)];
|
|
82
82
|
|
|
@@ -5,84 +5,84 @@ const ArraySet2 = [
|
|
|
5
5
|
top: 0,
|
|
6
6
|
width: 565,
|
|
7
7
|
height: 395,
|
|
8
|
-
url: "https://qcast
|
|
8
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/1.png",
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
left: 245,
|
|
12
12
|
top: 0,
|
|
13
13
|
width: 377,
|
|
14
14
|
height: 305,
|
|
15
|
-
url: "https://qcast
|
|
15
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/2.png",
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
left: 600,
|
|
19
19
|
top: 0,
|
|
20
20
|
width: 236,
|
|
21
21
|
height: 276,
|
|
22
|
-
url: "https://qcast
|
|
22
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/3.png",
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
left: 719,
|
|
26
26
|
top: 0,
|
|
27
27
|
width: 418,
|
|
28
28
|
height: 306,
|
|
29
|
-
url: "https://qcast
|
|
29
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/4.png",
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
left: 783,
|
|
33
33
|
top: 0,
|
|
34
34
|
width: 497,
|
|
35
35
|
height: 415,
|
|
36
|
-
url: "https://qcast
|
|
36
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/5.png",
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
left: 0,
|
|
40
40
|
top: 366,
|
|
41
41
|
width: 531,
|
|
42
42
|
height: 301,
|
|
43
|
-
url: "https://qcast
|
|
43
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/6.png",
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
left: 494,
|
|
47
47
|
top: 217,
|
|
48
48
|
width: 481,
|
|
49
49
|
height: 340,
|
|
50
|
-
url: "https://qcast
|
|
50
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/7.png",
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
left: 891,
|
|
54
54
|
top: 332,
|
|
55
55
|
width: 389,
|
|
56
56
|
height: 388,
|
|
57
|
-
url: "https://qcast
|
|
57
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/8.png",
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
left: 0,
|
|
61
61
|
top: 429,
|
|
62
62
|
width: 601,
|
|
63
63
|
height: 291,
|
|
64
|
-
url: "https://qcast
|
|
64
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/9.png",
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
left: 364,
|
|
68
68
|
top: 510,
|
|
69
69
|
width: 254,
|
|
70
70
|
height: 210,
|
|
71
|
-
url: "https://qcast
|
|
71
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/10.png",
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
left: 573,
|
|
75
75
|
top: 447,
|
|
76
76
|
width: 230,
|
|
77
77
|
height: 273,
|
|
78
|
-
url: "https://qcast
|
|
78
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/11.png",
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
left: 708,
|
|
82
82
|
top: 453,
|
|
83
83
|
width: 474,
|
|
84
84
|
height: 267,
|
|
85
|
-
url: "https://qcast
|
|
85
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config2/12.png",
|
|
86
86
|
},
|
|
87
87
|
];
|
|
88
88
|
export { ArraySet2}
|
|
@@ -4,98 +4,98 @@ const ArraySet3 = [
|
|
|
4
4
|
top: 0,
|
|
5
5
|
width: 232,
|
|
6
6
|
height: 287,
|
|
7
|
-
url: "https://qcast
|
|
7
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/1.png",
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
left: 213,
|
|
11
11
|
top: 0,
|
|
12
12
|
width: 588,
|
|
13
13
|
height: 315,
|
|
14
|
-
url: "https://qcast
|
|
14
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/2.png",
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
left: 223,
|
|
18
18
|
top: 0,
|
|
19
19
|
width: 582,
|
|
20
20
|
height: 316,
|
|
21
|
-
url: "https://qcast
|
|
21
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/3.png",
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
left: 811,
|
|
25
25
|
top: 62,
|
|
26
26
|
width: 469,
|
|
27
27
|
height: 257,
|
|
28
|
-
url: "https://qcast
|
|
28
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/4.png",
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
left: 943,
|
|
32
32
|
top: 0,
|
|
33
33
|
width: 337,
|
|
34
34
|
height: 162,
|
|
35
|
-
url: "https://qcast
|
|
35
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/5.png",
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
left: 0,
|
|
39
39
|
top: 260,
|
|
40
40
|
width: 272,
|
|
41
41
|
height: 460,
|
|
42
|
-
url: "https://qcast
|
|
42
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/6.png",
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
left: 86,
|
|
46
46
|
top: 168,
|
|
47
47
|
width: 728,
|
|
48
48
|
height: 350,
|
|
49
|
-
url: "https://qcast
|
|
49
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/7.png",
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
left: 806,
|
|
53
53
|
top: 223,
|
|
54
54
|
width: 474,
|
|
55
55
|
height: 133,
|
|
56
|
-
url: "https://qcast
|
|
56
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/8.png",
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
left: 706,
|
|
60
60
|
top: 0,
|
|
61
61
|
width: 295,
|
|
62
62
|
height: 319,
|
|
63
|
-
url: "https://qcast
|
|
63
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/9.png",
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
left: 51,
|
|
67
67
|
top: 319,
|
|
68
68
|
width: 765,
|
|
69
69
|
height: 401,
|
|
70
|
-
url: "https://qcast
|
|
70
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/10.png",
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
left: 688,
|
|
74
74
|
top: 321,
|
|
75
75
|
width: 304,
|
|
76
76
|
height: 399,
|
|
77
|
-
url: "https://qcast
|
|
77
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/11.png",
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
left: 814,
|
|
81
81
|
top: 320,
|
|
82
82
|
width: 345,
|
|
83
83
|
height: 400,
|
|
84
|
-
url: "https://qcast
|
|
84
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/12.png",
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
left: 816,
|
|
88
88
|
top: 315,
|
|
89
89
|
width: 464,
|
|
90
90
|
height: 211,
|
|
91
|
-
url: "https://qcast
|
|
91
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/13.png",
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
left: 979,
|
|
95
95
|
top: 413,
|
|
96
96
|
width: 301,
|
|
97
97
|
height: 307,
|
|
98
|
-
url: "https://qcast
|
|
98
|
+
url: "https://cdn.release.qcast.cn/JsViewFrameworkTester/JsViewVueSampleResources/SceneTransition/maskConfig/config3/14.png",
|
|
99
99
|
},
|
|
100
100
|
];
|
|
101
101
|
|