@shijiu/jsview-vue-samples 2.3.151-test.0 → 3.0.0-test.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/CssPreprocessor/Scss/PanelData.js +1 -1
- package/CssPreprocessor/Scss/components/scss-group4/ScssMaps.vue +4 -3
- package/CssPreprocessor/Scss/components/scss-group5/ScssImporting.vue +2 -2
- package/DemoForOperator/Bounce/FreeMoveBuilder.js +1 -1
- package/DemoForOperator/Firework1/App.vue +12 -1
- package/DemoForOperator/Firework1/Fireworks.vue +18 -0
- package/DemoForOperator/FlipPage/FlipPage/FlipPage.vue +1 -0
- package/DemoForOperator/Focus/Alpha/Item.vue +1 -0
- package/DemoForOperator/Focus/Light/Item.vue +1 -0
- package/DemoForOperator/Focus/Normal/Item.vue +1 -0
- package/DemoForOperator/FrameShadow/FrameShadow.vue +1 -1
- 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/Jigsaw/JigsawFull.vue +12 -7
- package/DemoForOperator/Jigsaw/JigsawSingle.vue +13 -7
- package/DemoForOperator/LongChatBox/App.vue +13 -13
- package/DemoForOperator/LongChatBox/Bubble.vue +78 -66
- package/DemoForOperator/LongChatBox/LongChat.vue +68 -36
- package/DemoForOperator/LongChatBox/testData.js +7 -44
- package/DemoForOperator/Sound/Bounce/FreeMoveBuilder.js +1 -1
- package/DemoForOperator/routeList.js +8 -2
- package/DemoHomepage/App.vue +74 -1
- package/DemoHomepage/components/BodyFrame.vue +1 -0
- package/DemoHomepage/components/TabFrame.vue +1 -1
- package/DemoHomepage/router.js +723 -160
- package/DemoHomepage/views/Homepage.vue +60 -2
- package/DemoHomepage/watchTest.vue +50 -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/FreeMoveChildAttract/App.vue +18 -8
- package/FreeMoveLink/App.vue +49 -20
- 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 +100 -47
- package/LongImage/Scroll.vue +28 -9
- package/LongText/LongTextScroll.vue +1 -0
- package/Markdown/App.vue +36 -0
- package/Markdown/Bubble.vue +109 -0
- package/Markdown/LongChat.vue +206 -0
- package/Markdown/Markdown/Markdown.vue +156 -0
- package/Markdown/Markdown/index.ts +1 -0
- package/Markdown/Markdown/marked/LICENSE.md +45 -0
- package/Markdown/Markdown/marked/index.ts +2 -0
- package/Markdown/Markdown/marked/marked.d.ts +756 -0
- package/Markdown/Markdown/marked/marked.js +71 -0
- package/Markdown/Markdown/parser.ts +1365 -0
- package/Markdown/data.js +581 -0
- package/MetroWidgetDemos/AI_skills_update.md +2 -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/RenderAccelerate/Item.vue +67 -0
- 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/{TripleWidget → SpatialNav}/Item.vue +1 -8
- package/MetroWidgetDemos/{TripleWidget/WidgetItem.vue → SpatialNav/SimpleFloor.vue} +14 -45
- 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 +22 -7
- package/MetroWidgetDemos/ninePatchFocusPage/Item.vue +7 -5
- package/MetroWidgetDemos/ninePatchFocusPage/focusConstants.js +2 -0
- package/MetroWidgetDemos/routeList.js +203 -12
- 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/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/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/TransitPage/App.vue +2 -0
- package/assets/logo.png +0 -0
- package/package.json +5 -5
- package/DemoForOperator/Genie/geniePakcer/Genie.vue +0 -741
- package/DemoForOperator/LongChatBox/TextManager.ts +0 -147
- package/DemoForOperator/LongChatBox/VirtualList.vue +0 -298
- package/DemoForOperator/LongChatBox/utile.js +0 -331
- 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 -87
- package/MetroWidgetDemos/TripleWidget/SWidgetItem.vue +0 -99
- 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/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
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-20 18:27:25
|
|
4
|
-
* @LastEditors: ZhengYi
|
|
5
|
-
* @LastEditTime: 2023-05-05
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script setup>
|
|
9
|
-
import { JsvActorMoveControl, JsvActorMove } from "jsview";
|
|
10
|
-
import { shallowRef, computed } from "vue"
|
|
11
|
-
const props = defineProps({
|
|
12
|
-
name: String,
|
|
13
|
-
})
|
|
14
|
-
let direction = shallowRef(1)
|
|
15
|
-
let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
|
|
16
|
-
let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
|
|
17
|
-
let focusNode = shallowRef(null)
|
|
18
|
-
|
|
19
|
-
const directionDetail = computed(() => {
|
|
20
|
-
return direction.value > 0 ? "上" : "下";
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
const onKeyDown = (ev) => {
|
|
24
|
-
if (ev.keyCode === 13) {
|
|
25
|
-
let preDirection = direction.value;
|
|
26
|
-
direction.value = -direction.value;
|
|
27
|
-
throwControl.throwAlongY(
|
|
28
|
-
0,
|
|
29
|
-
750 * preDirection,
|
|
30
|
-
{
|
|
31
|
-
type: "catch",
|
|
32
|
-
position: 200 * preDirection,
|
|
33
|
-
direction: preDirection,
|
|
34
|
-
},
|
|
35
|
-
(x, y) => {
|
|
36
|
-
console.log(`Throw end with x=${x} y=${y}`);
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
<template>
|
|
46
|
-
<jsv-focus-block ref="focusNode" :name="props.name" autoFocus :onAction="{
|
|
47
|
-
onKeyDown: onKeyDown,
|
|
48
|
-
}">
|
|
49
|
-
<div key="sample1" class="detail-font" :style="{ top: 150, left: 425, width: 430, height: 40 }">
|
|
50
|
-
{{ `向${directionDetail}加速` }}
|
|
51
|
-
</div>
|
|
52
|
-
<div key="DirectText" class="font" :style="{ top: 250, left: 425, width: 430, height: 40 }">
|
|
53
|
-
{{ `当前方向:${directionDetail}` }}
|
|
54
|
-
</div>
|
|
55
|
-
<div :style="{ top: 590, left: 625 }">
|
|
56
|
-
<jsv-actor-move key="move" :control="moveControl">
|
|
57
|
-
<jsv-actor-move key="throw" :control="throwControl">
|
|
58
|
-
<div :style="{ backgroundColor: '#FF0000', width: 30, height: 30 }"></div>
|
|
59
|
-
</jsv-actor-move>
|
|
60
|
-
</jsv-actor-move>
|
|
61
|
-
</div>
|
|
62
|
-
</jsv-focus-block>
|
|
63
|
-
</template>
|
|
64
|
-
|
|
65
|
-
<style scoped>
|
|
66
|
-
.font {
|
|
67
|
-
font-size: 32;
|
|
68
|
-
color: #73665c;
|
|
69
|
-
line-height: 40;
|
|
70
|
-
overflow: hidden;
|
|
71
|
-
white-space: nowrap;
|
|
72
|
-
text-overflow: ellipsis;
|
|
73
|
-
text-align: center;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.detail-font {
|
|
77
|
-
font-size: 32;
|
|
78
|
-
color: #f7f7eb;
|
|
79
|
-
line-height: 30;
|
|
80
|
-
overflow: hidden;
|
|
81
|
-
white-space: nowrap;
|
|
82
|
-
text-overflow: ellipsis;
|
|
83
|
-
text-align: center;
|
|
84
|
-
}
|
|
85
|
-
</style>
|
package/ThrowMoveDemo/App.vue
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-20 18:27:08
|
|
4
|
-
* @LastEditors: ZhengYi
|
|
5
|
-
* @LastEditTime: 2023-05-05
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script setup>
|
|
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
|
-
import { shallowRef } from "vue"
|
|
14
|
-
import { useRouter } from "vue-router"
|
|
15
|
-
|
|
16
|
-
const router=useRouter()
|
|
17
|
-
let demoIndex=shallowRef(0)
|
|
18
|
-
|
|
19
|
-
const onKeyDown=(ev)=>{
|
|
20
|
-
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
21
|
-
router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
if (ev.keyCode === 37) {
|
|
25
|
-
demoIndex.value = demoIndex.value - 1 < 0 ? 3 : demoIndex.value - 1;
|
|
26
|
-
} else if (ev.keyCode === 39) {
|
|
27
|
-
demoIndex.value = demoIndex.value + 1 > 3 ? 0 : demoIndex.value + 1;
|
|
28
|
-
}
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<template>
|
|
34
|
-
<div
|
|
35
|
-
:style="{
|
|
36
|
-
width: 1920,
|
|
37
|
-
height: 1080,
|
|
38
|
-
backgroundColor: '#000000',
|
|
39
|
-
}"
|
|
40
|
-
>
|
|
41
|
-
<div
|
|
42
|
-
key="leftWall"
|
|
43
|
-
:style="{
|
|
44
|
-
top: 0,
|
|
45
|
-
left: 425,
|
|
46
|
-
width: 5,
|
|
47
|
-
height: 620,
|
|
48
|
-
backgroundColor: '#F0F000',
|
|
49
|
-
}"
|
|
50
|
-
/>
|
|
51
|
-
<div
|
|
52
|
-
key="rightWall"
|
|
53
|
-
:style="{
|
|
54
|
-
top: 0,
|
|
55
|
-
left: 850,
|
|
56
|
-
width: 5,
|
|
57
|
-
height: 620,
|
|
58
|
-
backgroundColor: '#F0F000',
|
|
59
|
-
}"
|
|
60
|
-
/>
|
|
61
|
-
<div
|
|
62
|
-
key="bottomWall"
|
|
63
|
-
:style="{
|
|
64
|
-
top: 620,
|
|
65
|
-
left: 425,
|
|
66
|
-
width: 430,
|
|
67
|
-
height: 5,
|
|
68
|
-
backgroundColor: '#F0F000',
|
|
69
|
-
}"
|
|
70
|
-
/>
|
|
71
|
-
<div
|
|
72
|
-
key="GuidText1"
|
|
73
|
-
className="{CssStyles.FontStyle.getName()}"
|
|
74
|
-
:style="{ top: 625, left: (1280 - 430) / 2, width: 430, height: 40 }"
|
|
75
|
-
>
|
|
76
|
-
{`按OK键进行跳跃和转向`}
|
|
77
|
-
</div>
|
|
78
|
-
<div
|
|
79
|
-
key="GuidText2"
|
|
80
|
-
className="{CssStyles.FontStyle.getName()}"
|
|
81
|
-
:style="{ top: 625 + 40, left: (1280 - 430) / 2, width: 430, height: 40 }"
|
|
82
|
-
>
|
|
83
|
-
{`左右键切换不同模式的Demo`}
|
|
84
|
-
</div>
|
|
85
|
-
<jsv-focus-block
|
|
86
|
-
autoFocus
|
|
87
|
-
ref="focusNode"
|
|
88
|
-
:onAction="{
|
|
89
|
-
onKeyDown: onKeyDown,
|
|
90
|
-
}"
|
|
91
|
-
>
|
|
92
|
-
<LRParabolicDemo
|
|
93
|
-
v-if="demoIndex === 0"
|
|
94
|
-
name="/actorMove"
|
|
95
|
-
></LRParabolicDemo>
|
|
96
|
-
<UDParabolicDemo v-if="demoIndex === 1" name="/udDemo"></UDParabolicDemo>
|
|
97
|
-
<TargetDemo v-if="demoIndex === 2" name="/targetDemo"></TargetDemo>
|
|
98
|
-
<AccelerateDemo
|
|
99
|
-
v-if="demoIndex === 3"
|
|
100
|
-
name="/accelerateDemo"
|
|
101
|
-
></AccelerateDemo>
|
|
102
|
-
</jsv-focus-block>
|
|
103
|
-
</div>
|
|
104
|
-
</template>
|
|
@@ -1,101 +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 setup>
|
|
9
|
-
import { JsvActorMoveControl, JsvActorMove } from "jsview";
|
|
10
|
-
import { shallowRef } from "vue";
|
|
11
|
-
|
|
12
|
-
const props = defineProps({
|
|
13
|
-
name: String,
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
|
|
17
|
-
let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
|
|
18
|
-
|
|
19
|
-
let direction = shallowRef(1);
|
|
20
|
-
|
|
21
|
-
function onKeyDown(ev) {
|
|
22
|
-
switch (ev.keyCode) {
|
|
23
|
-
case 13:
|
|
24
|
-
direction.value = -direction.value;
|
|
25
|
-
|
|
26
|
-
moveControl.moveToX(195 * direction.value, 250, (x, y) => {
|
|
27
|
-
console.log(`Move end with x=${x} y=${y}`);
|
|
28
|
-
});
|
|
29
|
-
throwControl.throwAlongY(
|
|
30
|
-
-500,
|
|
31
|
-
750,
|
|
32
|
-
{ type: "catch", position: 0, direction: 1 },
|
|
33
|
-
(x, y) => {
|
|
34
|
-
console.log(`Throw end with x=${x} y=${y}`);
|
|
35
|
-
},
|
|
36
|
-
() => {
|
|
37
|
-
console.log("Get to the pole...");
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<template>
|
|
47
|
-
<jsv-focus-block
|
|
48
|
-
ref="focusNode"
|
|
49
|
-
:name="name"
|
|
50
|
-
autoFocus
|
|
51
|
-
:onAction="{
|
|
52
|
-
onKeyDown: onKeyDown,
|
|
53
|
-
}"
|
|
54
|
-
>
|
|
55
|
-
<div
|
|
56
|
-
key="sample1"
|
|
57
|
-
class="detail-font"
|
|
58
|
-
:style="{ top: 150, left: 425, width: 430, height: 40 }"
|
|
59
|
-
>
|
|
60
|
-
抛物线运动
|
|
61
|
-
</div>
|
|
62
|
-
<div
|
|
63
|
-
key="DirectText"
|
|
64
|
-
class="font"
|
|
65
|
-
:style="{ top: 250, left: 425, width: 430, height: 40 }"
|
|
66
|
-
>
|
|
67
|
-
{{ `当前方向:${direction > 0 ? "右" : "左"}` }}
|
|
68
|
-
</div>
|
|
69
|
-
<div :style="{ top: 590, left: 625 }">
|
|
70
|
-
<jsv-actor-move key="move" :control="moveControl">
|
|
71
|
-
<jsv-actor-move key="throw" :control="throwControl">
|
|
72
|
-
<div
|
|
73
|
-
:style="{ backgroundColor: '#00FF00', width: 30, height: 30 }"
|
|
74
|
-
></div>
|
|
75
|
-
</jsv-actor-move>
|
|
76
|
-
</jsv-actor-move>
|
|
77
|
-
</div>
|
|
78
|
-
</jsv-focus-block>
|
|
79
|
-
</template>
|
|
80
|
-
|
|
81
|
-
<style scoped>
|
|
82
|
-
.font {
|
|
83
|
-
font-size: 32;
|
|
84
|
-
color: #73665c;
|
|
85
|
-
line-height: 40;
|
|
86
|
-
overflow: hidden;
|
|
87
|
-
white-space: nowrap;
|
|
88
|
-
text-overflow: ellipsis;
|
|
89
|
-
text-align: center;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.detail-font {
|
|
93
|
-
font-size: 32;
|
|
94
|
-
color: #f7f7eb;
|
|
95
|
-
line-height: 30;
|
|
96
|
-
overflow: hidden;
|
|
97
|
-
white-space: nowrap;
|
|
98
|
-
text-overflow: ellipsis;
|
|
99
|
-
text-align: center;
|
|
100
|
-
}
|
|
101
|
-
</style>
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-20 18:27:25
|
|
4
|
-
* @LastEditors: ZhengYi
|
|
5
|
-
* @LastEditTime: 2023-05-05
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script setup>
|
|
9
|
-
import { JsvActorMoveControl, JsvActorMove } from "jsview";
|
|
10
|
-
import { shallowRef } from "vue";
|
|
11
|
-
|
|
12
|
-
const props = defineProps({
|
|
13
|
-
name: String,
|
|
14
|
-
})
|
|
15
|
-
let direction = shallowRef(1)
|
|
16
|
-
let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
|
|
17
|
-
let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
|
|
18
|
-
let focusNode=shallowRef(null)
|
|
19
|
-
|
|
20
|
-
const onKeyDown=(ev)=>{
|
|
21
|
-
if (ev.keyCode === 13) {
|
|
22
|
-
let preDirection = direction.value;
|
|
23
|
-
direction.value = -direction.value;
|
|
24
|
-
moveControl.moveToX(195 * direction.value, 250, (x, y) => {
|
|
25
|
-
console.log(`Move end with x=${x} y=${y}`);
|
|
26
|
-
});
|
|
27
|
-
const position = (-100 * preDirection) / 2;
|
|
28
|
-
throwControl.throwAlongY(
|
|
29
|
-
-500 * preDirection,
|
|
30
|
-
750 * preDirection,
|
|
31
|
-
{
|
|
32
|
-
type: "catch",
|
|
33
|
-
position,
|
|
34
|
-
direction: -1 * preDirection,
|
|
35
|
-
},
|
|
36
|
-
(x, y) => {
|
|
37
|
-
console.log(`Throw end with x=${x} y=${y}`);
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
</script>
|
|
46
|
-
|
|
47
|
-
<template>
|
|
48
|
-
<jsv-focus-block ref="focusNode" :name="props.name" autoFocus :onAction="{
|
|
49
|
-
onKeyDown: onKeyDown,
|
|
50
|
-
}">
|
|
51
|
-
<div key="sample1" class="detail-font" :style="{ top: 150, left: 425, width: 430, height: 40 }">
|
|
52
|
-
拐点前触碰目标点
|
|
53
|
-
</div>
|
|
54
|
-
<div key="DirectText" class="font" :style="{ top: 250, left: 425, width: 430, height: 40 }">
|
|
55
|
-
{{ `当前方向:${direction > 0 ? "右" : "左"}` }}
|
|
56
|
-
</div>
|
|
57
|
-
<div :style="{ top: 590, left: 625 }">
|
|
58
|
-
<jsv-actor-move key="move" :control="moveControl">
|
|
59
|
-
<jsv-actor-move key="throw" :control="throwControl">
|
|
60
|
-
<div :style="{ backgroundColor: '#0916ff', width: 30, height: 30 }"></div>
|
|
61
|
-
</jsv-actor-move>
|
|
62
|
-
</jsv-actor-move>
|
|
63
|
-
</div>
|
|
64
|
-
</jsv-focus-block>
|
|
65
|
-
</template>
|
|
66
|
-
|
|
67
|
-
<style scoped>
|
|
68
|
-
.font {
|
|
69
|
-
font-size: 32;
|
|
70
|
-
color: #73665c;
|
|
71
|
-
line-height: 40;
|
|
72
|
-
overflow: hidden;
|
|
73
|
-
white-space: nowrap;
|
|
74
|
-
text-overflow: ellipsis;
|
|
75
|
-
text-align: center;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.detail-font {
|
|
79
|
-
font-size: 32;
|
|
80
|
-
color: #f7f7eb;
|
|
81
|
-
line-height: 30;
|
|
82
|
-
overflow: hidden;
|
|
83
|
-
white-space: nowrap;
|
|
84
|
-
text-overflow: ellipsis;
|
|
85
|
-
text-align: center;
|
|
86
|
-
}
|
|
87
|
-
</style>
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-10-20 18:27:25
|
|
4
|
-
* @LastEditors: ZhengYi
|
|
5
|
-
* @LastEditTime: 2023-05-05
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
<script setup>
|
|
9
|
-
import { JsvActorMoveControl, JsvActorMove } from "jsview";
|
|
10
|
-
import { shallowRef, computed } from "vue";
|
|
11
|
-
|
|
12
|
-
let throwControl = new JsvActorMoveControl(); // 抛物运动体控制器
|
|
13
|
-
let moveControl = new JsvActorMoveControl(); // 平移运动体控制器
|
|
14
|
-
let focusNode=shallowRef(null)
|
|
15
|
-
|
|
16
|
-
const props = defineProps({
|
|
17
|
-
name: String,
|
|
18
|
-
})
|
|
19
|
-
let direction = shallowRef(1)
|
|
20
|
-
|
|
21
|
-
const directionDetail = computed(() => {
|
|
22
|
-
return direction.value < 0 ? "上" : "下";
|
|
23
|
-
})
|
|
24
|
-
const detail = computed(() => {
|
|
25
|
-
return direction.value < 0 ? "向上抛物" : "向下掷物并弹起";
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
const onKeyDown=(ev)=>{
|
|
29
|
-
let preDirection = direction.value;
|
|
30
|
-
switch (ev.keyCode) {
|
|
31
|
-
case 13:
|
|
32
|
-
direction.value = -direction.value;
|
|
33
|
-
throwControl.throwAlongY(
|
|
34
|
-
-400 * preDirection,
|
|
35
|
-
550 * preDirection,
|
|
36
|
-
{
|
|
37
|
-
type: "catch",
|
|
38
|
-
position: 100 * preDirection,
|
|
39
|
-
direction: preDirection,
|
|
40
|
-
},
|
|
41
|
-
(x, y) => {
|
|
42
|
-
console.log(`Throw end with x=${x} y=${y}`);
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
</script>
|
|
51
|
-
|
|
52
|
-
<template>
|
|
53
|
-
<jsv-focus-block ref="focusNode" :name="props.name" autoFocus :onAction="{
|
|
54
|
-
onKeyDown: onKeyDown,
|
|
55
|
-
}">
|
|
56
|
-
<div key="sample1" class="detail-font" :style="{ top: 150, left: 425, width: 430, height: 40 }">
|
|
57
|
-
{{ detail }}
|
|
58
|
-
</div>
|
|
59
|
-
<div key="DirectText" class="font" :style="{ top: 250, left: 425, width: 430, height: 40 }">
|
|
60
|
-
{{ `当前方向:${directionDetail}` }}
|
|
61
|
-
</div>
|
|
62
|
-
<div :style="{ top: 590, left: 625 }">
|
|
63
|
-
<jsv-actor-move key="move" :control="moveControl">
|
|
64
|
-
<jsv-actor-move key="throw" :control="throwControl">
|
|
65
|
-
<div :style="{ backgroundColor: '#ffb915', width: 30, height: 30 }"></div>
|
|
66
|
-
</jsv-actor-move>
|
|
67
|
-
</jsv-actor-move>
|
|
68
|
-
</div>
|
|
69
|
-
</jsv-focus-block>
|
|
70
|
-
</template>
|
|
71
|
-
|
|
72
|
-
<style scoped>
|
|
73
|
-
.font {
|
|
74
|
-
font-size: 32;
|
|
75
|
-
color: #73665c;
|
|
76
|
-
line-height: 40;
|
|
77
|
-
overflow: hidden;
|
|
78
|
-
white-space: nowrap;
|
|
79
|
-
text-overflow: ellipsis;
|
|
80
|
-
text-align: center;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.detail-font {
|
|
84
|
-
font-size: 32;
|
|
85
|
-
color: #f7f7eb;
|
|
86
|
-
line-height: 30;
|
|
87
|
-
overflow: hidden;
|
|
88
|
-
white-space: nowrap;
|
|
89
|
-
text-overflow: ellipsis;
|
|
90
|
-
text-align: center;
|
|
91
|
-
}
|
|
92
|
-
</style>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|