@shijiu/jsview-vue 1.9.727 → 1.9.747
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/index.d.ts +4 -1
- package/index.js +4 -1
- package/package.json +5 -16
- package/samples/AnimPicture/App.vue +0 -207
- package/samples/AnimPicture/assets/animated_webp.webp +0 -0
- package/samples/AnimPicture/assets/ball_3.webp +0 -0
- package/samples/AnimPicture/assets/girl_run.gif +0 -0
- package/samples/AnimPicture/assets/quan.webp +0 -0
- package/samples/Basic/App.vue +0 -134
- package/samples/Basic/assets/border.png +0 -0
- package/samples/Basic/assets/border2.png +0 -0
- package/samples/Basic/assets/icon.png +0 -0
- package/samples/Basic/assets/test.jpg +0 -0
- package/samples/Basic/components/ContentBlock.vue +0 -38
- package/samples/Basic/components/FontStyle.css +0 -16
- package/samples/Basic/components/anim/AnimGroup.vue +0 -66
- package/samples/Basic/components/anim/AnimKeyframeBasic.vue +0 -119
- package/samples/Basic/components/anim/AnimKeyframeComposite.vue +0 -52
- package/samples/Basic/components/anim/AnimTransition.vue +0 -157
- package/samples/Basic/components/div/DivBackground.vue +0 -44
- package/samples/Basic/components/div/DivClip.vue +0 -159
- package/samples/Basic/components/div/DivCssScoped.vue +0 -20
- package/samples/Basic/components/div/DivCssVar.vue +0 -53
- package/samples/Basic/components/div/DivGroup1.vue +0 -47
- package/samples/Basic/components/div/DivGroup2.vue +0 -65
- package/samples/Basic/components/div/DivLayout.vue +0 -70
- package/samples/Basic/components/div/DivRadius.vue +0 -65
- package/samples/Basic/components/div/DivTransform.vue +0 -32
- package/samples/Basic/components/img/ImageGroup.vue +0 -31
- package/samples/Basic/components/img/ImgLayout.vue +0 -41
- package/samples/Basic/components/panel/Panel1.vue +0 -55
- package/samples/Basic/components/panel/Panel2.vue +0 -31
- package/samples/Basic/components/panel/TitleBar.vue +0 -29
- package/samples/Basic/components/text/TextAlign.vue +0 -66
- package/samples/Basic/components/text/TextEmoji.vue +0 -26
- package/samples/Basic/components/text/TextFontStyle.vue +0 -89
- package/samples/Basic/components/text/TextGroup1.vue +0 -49
- package/samples/Basic/components/text/TextGroup2.vue +0 -28
- package/samples/Basic/components/text/TextOverflow.vue +0 -110
- package/samples/BasicFocusControl/App.vue +0 -104
- package/samples/BasicFocusControl/components/BaseBlock.vue +0 -50
- package/samples/BasicFocusControl/components/MainArea.vue +0 -83
- package/samples/BasicFocusControl/components/MainAreaLeftBlock.vue +0 -17
- package/samples/BasicFocusControl/components/MainAreaRightBlock.vue +0 -27
- package/samples/BasicFocusControl/components/SideBar.vue +0 -58
- package/samples/BasicFocusControl/components/SideBarBlock.vue +0 -27
- package/samples/Collision/App.vue +0 -452
- package/samples/ColorSpace/App.vue +0 -126
- package/samples/DemoHomepage/App.vue +0 -27
- package/samples/DemoHomepage/components/BodyFrame.vue +0 -95
- package/samples/DemoHomepage/components/Dialog.vue +0 -94
- package/samples/DemoHomepage/components/Item.vue +0 -77
- package/samples/DemoHomepage/components/TabFrame.vue +0 -85
- package/samples/DemoHomepage/router.js +0 -196
- package/samples/DemoHomepage/views/Homepage.vue +0 -195
- package/samples/FilterDemo/AnimatePic.vue +0 -58
- package/samples/FilterDemo/App.vue +0 -159
- package/samples/FilterDemo/VideoLayer.vue +0 -62
- package/samples/FlipCard/App.vue +0 -71
- package/samples/FlipCard/FlipCard.vue +0 -118
- package/samples/FlipCard/assets/blue_egg.png +0 -0
- package/samples/FlipCard/assets/red_egg.png +0 -0
- package/samples/FlipCard/data.js +0 -13
- package/samples/GridDemo/App.vue +0 -215
- package/samples/GridDemo/ButtonBlock.vue +0 -112
- package/samples/GridDemo/FocusItem.vue +0 -37
- package/samples/GridDemo/Item.vue +0 -93
- package/samples/HashHistory/App.vue +0 -115
- package/samples/HashHistory/components/HorizontalButtonList.vue +0 -91
- package/samples/HashHistory/components/Item.vue +0 -60
- package/samples/HashHistory/router.js +0 -41
- package/samples/HashHistory/views/MainPage.vue +0 -57
- package/samples/HashHistory/views/SubPage.vue +0 -66
- package/samples/ImpactStop/App.vue +0 -435
- package/samples/Input/App.vue +0 -164
- package/samples/Input/FullKeyboard.vue +0 -87
- package/samples/Input/InputPanel.vue +0 -131
- package/samples/Input/KeyboardItem.vue +0 -58
- package/samples/LongImage/App.vue +0 -80
- package/samples/LongImage/Button.vue +0 -58
- package/samples/LongImage/ButtonItem.vue +0 -44
- package/samples/LongImage/LongImageScroll.vue +0 -92
- package/samples/LongImage/Scroll.vue +0 -14
- package/samples/LongImage/assets/1280x7200.jpg +0 -0
- package/samples/LongText/App.vue +0 -96
- package/samples/LongText/Button.vue +0 -51
- package/samples/LongText/ButtonItem.vue +0 -44
- package/samples/LongText/LongTextScroll.vue +0 -192
- package/samples/LongText/Scroll.vue +0 -14
- package/samples/Marquee/App.vue +0 -247
- package/samples/Marquee/longText.js +0 -14
- package/samples/MaskClip/App.vue +0 -122
- package/samples/MaskClip/images/mask-025/config.json +0 -29
- package/samples/MaskClip/images/mask-025/res/1.png +0 -0
- package/samples/MaskClip/images/mask-025/res/2.png +0 -0
- package/samples/MaskClip/images/mask-025/res/3.png +0 -0
- package/samples/MaskClip/images/mask-025/res/4.png +0 -0
- package/samples/MaskClip/images/mask-025/res/icon.png +0 -0
- package/samples/MaskClip/images/mask-025/res/stroke.png +0 -0
- package/samples/MaskClip/images/php.jpg +0 -0
- package/samples/MetroWidgetDemos/Advanced/App.vue +0 -46
- package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +0 -90
- package/samples/MetroWidgetDemos/Advanced/Buttons.vue +0 -70
- package/samples/MetroWidgetDemos/Advanced/Mixed.vue +0 -77
- package/samples/MetroWidgetDemos/Advanced/widgets/Item.vue +0 -83
- package/samples/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +0 -89
- package/samples/MetroWidgetDemos/Advanced/widgets/Widgets.vue +0 -116
- package/samples/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
- package/samples/MetroWidgetDemos/Item.vue +0 -85
- package/samples/MetroWidgetDemos/PerformanceTest/App.vue +0 -210
- package/samples/MetroWidgetDemos/PerformanceTest/Item.vue +0 -90
- package/samples/MetroWidgetDemos/PerformanceTest/assets/bg.jpg +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_content.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_left.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_mid.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/coupon_right.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/focus_border.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/holder_logo.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/jrbm.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/line_left.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/line_mid.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/line_right.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/loading.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/logo.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/mcjx.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/tao.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/assets/tmall.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/border.png +0 -0
- package/samples/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +0 -386
- package/samples/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +0 -129
- package/samples/MetroWidgetDemos/PerformanceTest/data.js +0 -45
- package/samples/MetroWidgetDemos/PingPong/App.vue +0 -135
- package/samples/MetroWidgetDemos/PingPong/AppPage.vue +0 -73
- package/samples/MetroWidgetDemos/PingPong/AppTab.vue +0 -62
- package/samples/MetroWidgetDemos/PingPong/TabItem.vue +0 -84
- package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +0 -214
- package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +0 -75
- package/samples/MetroWidgetDemos/Simple/App.vue +0 -45
- package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +0 -111
- package/samples/MetroWidgetDemos/WidgetItem.vue +0 -89
- package/samples/MetroWidgetDemos/data.js +0 -205
- package/samples/NinePatchDemo/App.vue +0 -145
- package/samples/NinePatchDemo/Item.vue +0 -69
- package/samples/NinePatchDemo/assets/border.png +0 -0
- package/samples/Preload/App.vue +0 -135
- package/samples/Preload/Item.vue +0 -32
- package/samples/Preload/data.js +0 -23
- package/samples/Preload/images/awesomeface.png +0 -0
- package/samples/Preload/images/cat.jpg +0 -0
- package/samples/Preload/images/rank.png +0 -0
- package/samples/Preload/images/rank_focus.png +0 -0
- package/samples/Preload/images/rule.png +0 -0
- package/samples/Preload/images/rule_focus.png +0 -0
- package/samples/Preload/images/start.png +0 -0
- package/samples/Preload/images/start_focus.png +0 -0
- package/samples/QrcodeDemo/App.vue +0 -68
- package/samples/ScaleDownNeon/App.vue +0 -107
- package/samples/SoundPool/App.vue +0 -134
- package/samples/SoundPool/bgmusic.mp3 +0 -0
- package/samples/SoundPool/coin.mp3 +0 -0
- package/samples/SoundPool/jump.mp3 +0 -0
- package/samples/SoundPool/lose.mp3 +0 -0
- package/samples/SoundPool/run.mp3 +0 -0
- package/samples/SprayView/App.vue +0 -272
- package/samples/SprayView/assets/snow.png +0 -0
- package/samples/SpriteImage/App.vue +0 -173
- package/samples/SpriteImage/images/cat_run.png +0 -0
- package/samples/SpriteImage/images/egg_break.json +0 -116
- package/samples/SpriteImage/images/egg_break.png +0 -0
- package/samples/SpriteImage/images/sprite.png +0 -0
- package/samples/TextBox/App.vue +0 -91
- package/samples/TextBox/RenderCenter.vue +0 -133
- package/samples/TextBox/RenderLeft.vue +0 -138
- package/samples/TextBox/RenderOneLine.vue +0 -101
- package/samples/TextBox/RenderRight.vue +0 -131
- package/samples/TextShadowDemo/App.vue +0 -91
- package/samples/TextureAnimation/App.vue +0 -336
- package/samples/TextureAnimation/App2.vue +0 -111
- package/samples/TextureAnimation/assets/blackWhiteGrid.png +0 -0
- package/samples/TextureAnimation/assets/light.png +0 -0
- package/samples/TextureAnimation/assets/light2.png +0 -0
- package/samples/TextureAnimation/assets/mask.png +0 -0
- package/samples/TextureAnimation/assets/php.jpg +0 -0
- package/samples/TextureAnimation/assets/php2.png +0 -0
- package/samples/TextureAnimation/assets/swipLight.png +0 -0
- package/samples/TextureSize/App.vue +0 -132
- package/samples/TextureSize/bmpDemo.bmp +0 -0
- package/samples/TextureSize/jpegDemo.jpeg +0 -0
- package/samples/TextureSize/jpgDemo.jpg +0 -0
- package/samples/TextureSize/pngDemo.png +0 -0
- package/samples/TextureSize/pngNoAlphaDemo.png +0 -0
- package/samples/ThrowMoveDemo/AccelerateDemo.vue +0 -116
- package/samples/ThrowMoveDemo/App.vue +0 -114
- package/samples/ThrowMoveDemo/LRParabolicDemo.vue +0 -115
- package/samples/ThrowMoveDemo/TargetDemo.vue +0 -116
- package/samples/ThrowMoveDemo/UDParabolicDemo.vue +0 -121
- package/samples/TouchSample/App.vue +0 -136
- package/samples/TouchSample/Item.vue +0 -103
- package/samples/TouchSample/MetroWidgetHorizontal.vue +0 -144
- package/samples/TouchSample/MetroWidgetVertical.vue +0 -144
- package/samples/TouchSample/TouchContainerHorizontal.vue +0 -160
- package/samples/TouchSample/TouchContainerVertical.vue +0 -160
- package/samples/TouchSample/data.js +0 -81
- package/samples/TransitPage/App.vue +0 -29
- package/samples/VideoDemo/App.vue +0 -121
- package/samples/VideoDemo/components/Button.vue +0 -58
- package/samples/VideoDemo/components/Controllor.vue +0 -197
- package/samples/VideoDemo/components/VideoFrame.vue +0 -140
- package/samples/VisibleSensorDemo/App.vue +0 -234
- package/samples/assets/bmpDemo.bmp +0 -0
- package/samples/assets/jpegDemo.jpeg +0 -0
- package/samples/assets/pngDemo.png +0 -0
- package/samples/assets/pngNoAlphaDemo.png +0 -0
- package/samples/assets/webpDemo.webp +0 -0
- package/tsconfig.json +0 -47
- package/utils/index.d.ts +0 -3
- package/utils/index.js +0 -10
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref, shallowRef, reactive } from "vue";
|
|
3
|
-
import { useRouter } from "vue-router";
|
|
4
|
-
import {
|
|
5
|
-
jJsvRuntimeBridge,
|
|
6
|
-
getKeyFramesGroup,
|
|
7
|
-
JsvTextureAnim,
|
|
8
|
-
TexAlignAnchor,
|
|
9
|
-
DECORATE_NINEPATCH_ALPHA_MIX,
|
|
10
|
-
DECORATE_BORDER_RADIUS,
|
|
11
|
-
} from "jsview";
|
|
12
|
-
import img from "./assets/light.png";
|
|
13
|
-
import img2 from "./assets/light2.png";
|
|
14
|
-
import mask from "./assets/mask.png";
|
|
15
|
-
|
|
16
|
-
const getRandom = (start, end) => {
|
|
17
|
-
return Math.round(Math.random() * (end - start) + start);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const router = useRouter();
|
|
21
|
-
const width = ref(300);
|
|
22
|
-
const height = ref(200);
|
|
23
|
-
const left = ref(50);
|
|
24
|
-
const top = ref(80);
|
|
25
|
-
const rotateAnimation =
|
|
26
|
-
"{from {transform: rotate3d(0,0,1,0);} to {transform: rotate3d(0,0,1,360deg);}}";
|
|
27
|
-
|
|
28
|
-
const ninePatchDecorator = {
|
|
29
|
-
type: DECORATE_NINEPATCH_ALPHA_MIX,
|
|
30
|
-
url: `url(${mask})`,
|
|
31
|
-
imageWidth: 86,
|
|
32
|
-
centerWidth: 2,
|
|
33
|
-
borderOutset: 0,
|
|
34
|
-
animTime: 0.5,
|
|
35
|
-
};
|
|
36
|
-
//注意texture的尺寸需要兼顾最大的view
|
|
37
|
-
const texCoord = {
|
|
38
|
-
width: 600,
|
|
39
|
-
height: 600,
|
|
40
|
-
};
|
|
41
|
-
const onKeyDown = (ev) => {
|
|
42
|
-
// 8:Backspace, 27:Escape, 10000:盒子返回键
|
|
43
|
-
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
44
|
-
router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
45
|
-
} else if (ev.keyCode == 13) {
|
|
46
|
-
left.value = getRandom(50, 400);
|
|
47
|
-
top.value = getRandom(80, 200);
|
|
48
|
-
width.value = getRandom(100, 300);
|
|
49
|
-
height.value = getRandom(100, 300);
|
|
50
|
-
}
|
|
51
|
-
return true;
|
|
52
|
-
};
|
|
53
|
-
</script>
|
|
54
|
-
<template>
|
|
55
|
-
<jsv-focus-block
|
|
56
|
-
autoFocus
|
|
57
|
-
:onKeyDown="onKeyDown"
|
|
58
|
-
:style="{
|
|
59
|
-
width: 1280,
|
|
60
|
-
height: 720,
|
|
61
|
-
backgroundImage:
|
|
62
|
-
'https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/BackgroundLongmao.jpg',
|
|
63
|
-
}"
|
|
64
|
-
>
|
|
65
|
-
<div
|
|
66
|
-
:style="{
|
|
67
|
-
textAlign: 'center',
|
|
68
|
-
fontSize: '30px',
|
|
69
|
-
lineHeight: '50px',
|
|
70
|
-
color: '#ffffff',
|
|
71
|
-
left: 140,
|
|
72
|
-
top: 20,
|
|
73
|
-
width: 1000,
|
|
74
|
-
height: 50,
|
|
75
|
-
backgroundColor: 'rgba(27,38,151,0.8)',
|
|
76
|
-
}"
|
|
77
|
-
>
|
|
78
|
-
.9型的旋转焦点框,OK键进行随机位置+尺寸变换
|
|
79
|
-
</div>
|
|
80
|
-
<div>
|
|
81
|
-
<jsv-texture-anim
|
|
82
|
-
:src="img"
|
|
83
|
-
:left="left"
|
|
84
|
-
:top="top"
|
|
85
|
-
:width="width"
|
|
86
|
-
:height="height"
|
|
87
|
-
:texCoord="texCoord"
|
|
88
|
-
:animation="rotateAnimation"
|
|
89
|
-
:duration="2000"
|
|
90
|
-
:repeat="-1"
|
|
91
|
-
:autoStart="true"
|
|
92
|
-
:decorate="ninePatchDecorator"
|
|
93
|
-
></jsv-texture-anim>
|
|
94
|
-
</div>
|
|
95
|
-
<div>
|
|
96
|
-
<jsv-texture-anim
|
|
97
|
-
:src="img2"
|
|
98
|
-
:left="left + 500"
|
|
99
|
-
:top="top"
|
|
100
|
-
:width="width"
|
|
101
|
-
:height="height"
|
|
102
|
-
:texCoord="texCoord"
|
|
103
|
-
:animation="rotateAnimation"
|
|
104
|
-
:duration="2000"
|
|
105
|
-
:repeat="-1"
|
|
106
|
-
:autoStart="true"
|
|
107
|
-
:decorate="ninePatchDecorator"
|
|
108
|
-
></jsv-texture-anim>
|
|
109
|
-
</div>
|
|
110
|
-
</jsv-focus-block>
|
|
111
|
-
</template>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import jpegDemo from "./jpegDemo.jpeg";
|
|
3
|
-
import pngDemo from "./pngDemo.png";
|
|
4
|
-
import pngNoAlphaDemo from "./pngNoAlphaDemo.png";
|
|
5
|
-
import bmpDemo from "./bmpDemo.bmp";
|
|
6
|
-
import { useRouter } from "vue-router";
|
|
7
|
-
|
|
8
|
-
const router = useRouter();
|
|
9
|
-
|
|
10
|
-
const onKeyDown = (ev) => {
|
|
11
|
-
// 8:Backspace, 27:Escape, 10000:盒子返回键
|
|
12
|
-
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
13
|
-
if (window.JsView) {
|
|
14
|
-
window.JsView.setGlobalConfig({
|
|
15
|
-
texCache: -1,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
router.go(-1); // 有router时,回退
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
return false;
|
|
23
|
-
};
|
|
24
|
-
</script>
|
|
25
|
-
<template>
|
|
26
|
-
<jsv-focus-block autoFocus :onKeyDown="onKeyDown">
|
|
27
|
-
<div class="allBgc">
|
|
28
|
-
<div class="block">
|
|
29
|
-
<div :style="{ left: 0, top: 0 }">
|
|
30
|
-
<div class="leftFont top0">
|
|
31
|
-
{{ `原图加载\n内存占用由图片尺寸决定` }}
|
|
32
|
-
</div>
|
|
33
|
-
<div class="leftFont top250">
|
|
34
|
-
{{
|
|
35
|
-
`指定尺寸加载\n内存占用由给定尺寸决定,图片质量基本没变,但更省内存`
|
|
36
|
-
}}
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<div :style="{ left: 220, top: 0 }">
|
|
41
|
-
<img alt="" class="graphSize top0" :src="bmpDemo" />
|
|
42
|
-
<img
|
|
43
|
-
alt=""
|
|
44
|
-
class="graphSize top250"
|
|
45
|
-
jsvImgScaledownTex
|
|
46
|
-
:src="bmpDemo"
|
|
47
|
-
/>
|
|
48
|
-
<div class="underFont">
|
|
49
|
-
{{ `bmp图片\n指定尺寸噪点明显更大` }}
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
<div :style="{ left: 440, top: 0 }">
|
|
54
|
-
<img alt="" class="graphSize top0" :src="jpegDemo" />
|
|
55
|
-
<img
|
|
56
|
-
alt=""
|
|
57
|
-
class="graphSize top250"
|
|
58
|
-
jsvImgScaledownTex
|
|
59
|
-
:src="jpegDemo"
|
|
60
|
-
/>
|
|
61
|
-
<div class="underFont">
|
|
62
|
-
{{ "jpg/jpeg图片" }}
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
<div :style="{ left: 660, top: 0 }">
|
|
67
|
-
<img alt="" class="graphSize top0" :src="pngDemo" />
|
|
68
|
-
<img
|
|
69
|
-
alt=""
|
|
70
|
-
:src="pngDemo"
|
|
71
|
-
class="graphSize top250"
|
|
72
|
-
jsvImgScaledownTex
|
|
73
|
-
/>
|
|
74
|
-
<div class="underFont">
|
|
75
|
-
{{ `png有透明图片\n指定尺寸有明显锯齿` }}
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<div :style="{ left: 880, top: 0 }">
|
|
80
|
-
<img alt="" class="graphSize top0" :src="pngNoAlphaDemo" />
|
|
81
|
-
<img
|
|
82
|
-
alt=""
|
|
83
|
-
:src="pngNoAlphaDemo"
|
|
84
|
-
class="graphSize top250"
|
|
85
|
-
jsvImgScaledownTex
|
|
86
|
-
/>
|
|
87
|
-
<div class="underFont">
|
|
88
|
-
{{ `png无透明图片` }}
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</jsv-focus-block>
|
|
94
|
-
</template>
|
|
95
|
-
<style scoped>
|
|
96
|
-
.allBgc {
|
|
97
|
-
width: 1920;
|
|
98
|
-
height: 1080;
|
|
99
|
-
background-color: #334c4c;
|
|
100
|
-
}
|
|
101
|
-
.block {
|
|
102
|
-
left: 20;
|
|
103
|
-
top: 50;
|
|
104
|
-
}
|
|
105
|
-
.leftFont {
|
|
106
|
-
left: 0;
|
|
107
|
-
width: 210;
|
|
108
|
-
height: 200;
|
|
109
|
-
color: #ffffff;
|
|
110
|
-
font-size: 30px;
|
|
111
|
-
}
|
|
112
|
-
.top0 {
|
|
113
|
-
top: 0;
|
|
114
|
-
}
|
|
115
|
-
.top250 {
|
|
116
|
-
top: 250;
|
|
117
|
-
}
|
|
118
|
-
.graphSize {
|
|
119
|
-
left: 0;
|
|
120
|
-
width: 200;
|
|
121
|
-
height: 200;
|
|
122
|
-
border-radius: 15px 15px 15px 15px;
|
|
123
|
-
}
|
|
124
|
-
.underFont {
|
|
125
|
-
left: 0;
|
|
126
|
-
top: 500;
|
|
127
|
-
width: 200;
|
|
128
|
-
height: 200;
|
|
129
|
-
color: #ffffff;
|
|
130
|
-
font-size: 20px;
|
|
131
|
-
}
|
|
132
|
-
</style>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-20 18:27:25
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2022-07-08 14:11:05
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
import { JsvActorMoveControl, JsvActorMove } from "jsview";
|
|
10
|
-
export default {
|
|
11
|
-
components: {
|
|
12
|
-
JsvActorMove,
|
|
13
|
-
},
|
|
14
|
-
props: {
|
|
15
|
-
name: String,
|
|
16
|
-
},
|
|
17
|
-
data() {
|
|
18
|
-
return {
|
|
19
|
-
direction: 1,
|
|
20
|
-
};
|
|
21
|
-
},
|
|
22
|
-
computed: {
|
|
23
|
-
directionDetail() {
|
|
24
|
-
return this.direction > 0 ? "上" : "下";
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
setup() {
|
|
28
|
-
let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
|
|
29
|
-
let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
|
|
30
|
-
|
|
31
|
-
return {
|
|
32
|
-
throwControl,
|
|
33
|
-
moveControl,
|
|
34
|
-
};
|
|
35
|
-
},
|
|
36
|
-
methods: {
|
|
37
|
-
onKeyDown(ev) {
|
|
38
|
-
if (ev.keyCode === 13) {
|
|
39
|
-
let preDirection = this.direction;
|
|
40
|
-
this.direction = -this.direction;
|
|
41
|
-
this.throwControl.throwAlongY(
|
|
42
|
-
0,
|
|
43
|
-
750 * preDirection,
|
|
44
|
-
{
|
|
45
|
-
type: "catch",
|
|
46
|
-
position: 200 * preDirection,
|
|
47
|
-
direction: preDirection,
|
|
48
|
-
},
|
|
49
|
-
(x, y) => {
|
|
50
|
-
console.log(`Throw end with x=${x} y=${y}`);
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
return false;
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
</script>
|
|
60
|
-
|
|
61
|
-
<template>
|
|
62
|
-
<jsv-focus-block
|
|
63
|
-
ref="focusNode"
|
|
64
|
-
:name="name"
|
|
65
|
-
autoFocus
|
|
66
|
-
:onAction="{
|
|
67
|
-
onKeyDown: onKeyDown,
|
|
68
|
-
}"
|
|
69
|
-
>
|
|
70
|
-
<div
|
|
71
|
-
key="sample1"
|
|
72
|
-
class="detail-font"
|
|
73
|
-
:style="{ top: 150, left: 425, width: 430, height: 40 }"
|
|
74
|
-
>
|
|
75
|
-
{{ `向${directionDetail}加速` }}
|
|
76
|
-
</div>
|
|
77
|
-
<div
|
|
78
|
-
key="DirectText"
|
|
79
|
-
class="font"
|
|
80
|
-
:style="{ top: 250, left: 425, width: 430, height: 40 }"
|
|
81
|
-
>
|
|
82
|
-
{{ `当前方向:${directionDetail}` }}
|
|
83
|
-
</div>
|
|
84
|
-
<div :style="{ top: 590, left: 625 }">
|
|
85
|
-
<jsv-actor-move key="move" :control="moveControl">
|
|
86
|
-
<jsv-actor-move key="throw" :control="throwControl">
|
|
87
|
-
<div
|
|
88
|
-
:style="{ backgroundColor: '#FF0000', width: 30, height: 30 }"
|
|
89
|
-
></div>
|
|
90
|
-
</jsv-actor-move>
|
|
91
|
-
</jsv-actor-move>
|
|
92
|
-
</div>
|
|
93
|
-
</jsv-focus-block>
|
|
94
|
-
</template>
|
|
95
|
-
|
|
96
|
-
<style scoped>
|
|
97
|
-
.font {
|
|
98
|
-
font-size: 32px;
|
|
99
|
-
color: #73665c;
|
|
100
|
-
line-height: 40px;
|
|
101
|
-
overflow: hidden;
|
|
102
|
-
white-space: nowrap;
|
|
103
|
-
text-overflow: ellipsis;
|
|
104
|
-
text-align: center;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.detail-font {
|
|
108
|
-
font-size: 32px;
|
|
109
|
-
color: #f7f7eb;
|
|
110
|
-
line-height: 30px;
|
|
111
|
-
overflow: hidden;
|
|
112
|
-
white-space: nowrap;
|
|
113
|
-
text-overflow: ellipsis;
|
|
114
|
-
text-align: center;
|
|
115
|
-
}
|
|
116
|
-
</style>
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-20 18:27:08
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2021-10-25 09:38:21
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
import LRParabolicDemo from "./LRParabolicDemo.vue";
|
|
10
|
-
import UDParabolicDemo from "./UDParabolicDemo.vue";
|
|
11
|
-
import TargetDemo from "./TargetDemo.vue";
|
|
12
|
-
import AccelerateDemo from "./AccelerateDemo.vue";
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
components: {
|
|
16
|
-
LRParabolicDemo,
|
|
17
|
-
UDParabolicDemo,
|
|
18
|
-
TargetDemo,
|
|
19
|
-
AccelerateDemo,
|
|
20
|
-
},
|
|
21
|
-
data() {
|
|
22
|
-
return {
|
|
23
|
-
demoIndex: 0,
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
methods: {
|
|
27
|
-
onKeyDown(ev) {
|
|
28
|
-
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
29
|
-
this.$router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
if (ev.keyCode === 37) {
|
|
33
|
-
this.demoIndex = this.demoIndex - 1 < 0 ? 3 : this.demoIndex - 1;
|
|
34
|
-
} else if (ev.keyCode === 39) {
|
|
35
|
-
this.demoIndex = this.demoIndex - +1 > 3 ? 0 : this.demoIndex + 1;
|
|
36
|
-
}
|
|
37
|
-
return true;
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
</script>
|
|
42
|
-
|
|
43
|
-
<template>
|
|
44
|
-
<div
|
|
45
|
-
:style="{
|
|
46
|
-
width: 1920,
|
|
47
|
-
height: 1080,
|
|
48
|
-
backgroundColor: '#000000',
|
|
49
|
-
}"
|
|
50
|
-
>
|
|
51
|
-
<div
|
|
52
|
-
key="leftWall"
|
|
53
|
-
:style="{
|
|
54
|
-
top: 0,
|
|
55
|
-
left: 425,
|
|
56
|
-
width: 5,
|
|
57
|
-
height: 620,
|
|
58
|
-
backgroundColor: '#F0F000',
|
|
59
|
-
}"
|
|
60
|
-
/>
|
|
61
|
-
<div
|
|
62
|
-
key="rightWall"
|
|
63
|
-
:style="{
|
|
64
|
-
top: 0,
|
|
65
|
-
left: 850,
|
|
66
|
-
width: 5,
|
|
67
|
-
height: 620,
|
|
68
|
-
backgroundColor: '#F0F000',
|
|
69
|
-
}"
|
|
70
|
-
/>
|
|
71
|
-
<div
|
|
72
|
-
key="bottomWall"
|
|
73
|
-
:style="{
|
|
74
|
-
top: 620,
|
|
75
|
-
left: 425,
|
|
76
|
-
width: 430,
|
|
77
|
-
height: 5,
|
|
78
|
-
backgroundColor: '#F0F000',
|
|
79
|
-
}"
|
|
80
|
-
/>
|
|
81
|
-
<div
|
|
82
|
-
key="GuidText1"
|
|
83
|
-
className="{CssStyles.FontStyle.getName()}"
|
|
84
|
-
:style="{ top: 625, left: (1280 - 430) / 2, width: 430, height: 40 }"
|
|
85
|
-
>
|
|
86
|
-
{`按OK键进行跳跃和转向`}
|
|
87
|
-
</div>
|
|
88
|
-
<div
|
|
89
|
-
key="GuidText2"
|
|
90
|
-
className="{CssStyles.FontStyle.getName()}"
|
|
91
|
-
:style="{ top: 625 + 40, left: (1280 - 430) / 2, width: 430, height: 40 }"
|
|
92
|
-
>
|
|
93
|
-
{`左右键切换不同模式的Demo`}
|
|
94
|
-
</div>
|
|
95
|
-
<jsv-focus-block
|
|
96
|
-
autoFocus
|
|
97
|
-
ref="focusNode"
|
|
98
|
-
:onAction="{
|
|
99
|
-
onKeyDown: onKeyDown,
|
|
100
|
-
}"
|
|
101
|
-
>
|
|
102
|
-
<LRParabolicDemo
|
|
103
|
-
v-if="demoIndex === 0"
|
|
104
|
-
name="/actorMove"
|
|
105
|
-
></LRParabolicDemo>
|
|
106
|
-
<UDParabolicDemo v-if="demoIndex === 1" name="/udDemo"></UDParabolicDemo>
|
|
107
|
-
<TargetDemo v-if="demoIndex === 2" name="/targetDemo"></TargetDemo>
|
|
108
|
-
<AccelerateDemo
|
|
109
|
-
v-if="demoIndex === 3"
|
|
110
|
-
name="/accelerateDemo"
|
|
111
|
-
></AccelerateDemo>
|
|
112
|
-
</jsv-focus-block>
|
|
113
|
-
</div>
|
|
114
|
-
</template>
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-20 18:27:25
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2021-10-21 14:01:59
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script>
|
|
9
|
-
import { JsvActorMoveControl, JsvActorMove } from "jsview";
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
components: {
|
|
13
|
-
JsvActorMove,
|
|
14
|
-
},
|
|
15
|
-
props: {
|
|
16
|
-
name: String,
|
|
17
|
-
},
|
|
18
|
-
data() {
|
|
19
|
-
return {
|
|
20
|
-
direction: 1,
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
setup() {
|
|
24
|
-
let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
|
|
25
|
-
let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
throwControl,
|
|
29
|
-
moveControl,
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
methods: {
|
|
33
|
-
onKeyDown(ev) {
|
|
34
|
-
switch (ev.keyCode) {
|
|
35
|
-
case 13:
|
|
36
|
-
this.direction = -this.direction;
|
|
37
|
-
|
|
38
|
-
this.moveControl.moveToX(195 * this.direction, 250, (x, y) => {
|
|
39
|
-
console.log(`Move end with x=${x} y=${y}`);
|
|
40
|
-
});
|
|
41
|
-
this.throwControl.throwAlongY(
|
|
42
|
-
-500,
|
|
43
|
-
750,
|
|
44
|
-
{ type: "catch", position: 0, direction: 1 },
|
|
45
|
-
(x, y) => {
|
|
46
|
-
console.log(`Throw end with x=${x} y=${y}`);
|
|
47
|
-
},
|
|
48
|
-
() => {
|
|
49
|
-
console.log("Get to the pole...");
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
return false;
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
</script>
|
|
59
|
-
|
|
60
|
-
<template>
|
|
61
|
-
<jsv-focus-block
|
|
62
|
-
ref="focusNode"
|
|
63
|
-
:name="name"
|
|
64
|
-
autoFocus
|
|
65
|
-
:onAction="{
|
|
66
|
-
onKeyDown: onKeyDown,
|
|
67
|
-
}"
|
|
68
|
-
>
|
|
69
|
-
<div
|
|
70
|
-
key="sample1"
|
|
71
|
-
class="detail-font"
|
|
72
|
-
:style="{ top: 150, left: 425, width: 430, height: 40 }"
|
|
73
|
-
>
|
|
74
|
-
抛物线运动
|
|
75
|
-
</div>
|
|
76
|
-
<div
|
|
77
|
-
key="DirectText"
|
|
78
|
-
class="font"
|
|
79
|
-
:style="{ top: 250, left: 425, width: 430, height: 40 }"
|
|
80
|
-
>
|
|
81
|
-
{{ `当前方向:${direction > 0 ? "右" : "左"}` }}
|
|
82
|
-
</div>
|
|
83
|
-
<div :style="{ top: 590, left: 625 }">
|
|
84
|
-
<jsv-actor-move key="move" :control="moveControl">
|
|
85
|
-
<jsv-actor-move key="throw" :control="throwControl">
|
|
86
|
-
<div
|
|
87
|
-
:style="{ backgroundColor: '#00FF00', width: 30, height: 30 }"
|
|
88
|
-
></div>
|
|
89
|
-
</jsv-actor-move>
|
|
90
|
-
</jsv-actor-move>
|
|
91
|
-
</div>
|
|
92
|
-
</jsv-focus-block>
|
|
93
|
-
</template>
|
|
94
|
-
|
|
95
|
-
<style scoped>
|
|
96
|
-
.font {
|
|
97
|
-
font-size: 32px;
|
|
98
|
-
color: #73665c;
|
|
99
|
-
line-height: 40px;
|
|
100
|
-
overflow: hidden;
|
|
101
|
-
white-space: nowrap;
|
|
102
|
-
text-overflow: ellipsis;
|
|
103
|
-
text-align: center;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.detail-font {
|
|
107
|
-
font-size: 32px;
|
|
108
|
-
color: #f7f7eb;
|
|
109
|
-
line-height: 30px;
|
|
110
|
-
overflow: hidden;
|
|
111
|
-
white-space: nowrap;
|
|
112
|
-
text-overflow: ellipsis;
|
|
113
|
-
text-align: center;
|
|
114
|
-
}
|
|
115
|
-
</style>
|