@shijiu/jsview-vue 0.9.602 → 0.9.684
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/dom/bin/jsview-browser-debug-dom.min.js +1 -1
- package/dom/bin/jsview-dom.min.js +1 -1
- package/dom/bin/jsview-engine-js-browser.min.js +1 -0
- package/dom/target_core_revision.js +4 -4
- package/package.json +1 -1
- package/samples/Basic/components/text/TextOverflow.vue +10 -5
- package/samples/Collision/App.vue +452 -0
- package/samples/DemoHomepage/components/BodyFrame.vue +2 -0
- package/samples/DemoHomepage/router.js +25 -0
- package/samples/DemoHomepage/views/Homepage.vue +3 -10
- package/samples/ImpactStop/App.vue +435 -0
- package/samples/Input/App.vue +8 -17
- package/samples/Input/InputPanel.vue +18 -11
- package/samples/Marquee/App.vue +176 -40
- package/samples/Marquee/longText.js +14 -0
- package/samples/MetroWidgetDemos/Advanced/App.vue +5 -6
- package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +1 -1
- package/samples/MetroWidgetDemos/Advanced/Buttons.vue +5 -5
- package/samples/MetroWidgetDemos/Advanced/Mixed.vue +4 -4
- package/samples/MetroWidgetDemos/Advanced/widgets/Item.vue +83 -0
- package/samples/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +89 -0
- package/samples/MetroWidgetDemos/Advanced/{Widgets.vue → widgets/Widgets.vue} +56 -11
- package/samples/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
- package/samples/MetroWidgetDemos/Item.vue +20 -2
- package/samples/MetroWidgetDemos/PingPong/App.vue +3 -3
- package/samples/MetroWidgetDemos/PingPong/AppPage.vue +17 -2
- package/samples/MetroWidgetDemos/PingPong/AppTab.vue +3 -10
- package/samples/MetroWidgetDemos/PingPong/{Item.vue → TabItem.vue} +2 -10
- package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +2 -2
- package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +2 -2
- package/samples/MetroWidgetDemos/Simple/App.vue +2 -2
- package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +4 -4
- package/samples/MetroWidgetDemos/data.js +2 -1
- package/samples/Preload/App.vue +16 -11
- package/samples/ScaleDownNeon/App.vue +107 -0
- package/samples/TextBox/App.vue +7 -81
- package/samples/TextBox/RenderCenter.vue +40 -16
- package/samples/TextBox/RenderLeft.vue +48 -19
- package/samples/TextBox/RenderOneLine.vue +30 -49
- package/samples/TextBox/RenderRight.vue +40 -16
- package/samples/TextShadowDemo/App.vue +11 -17
- package/samples/TextureAnimation/App2.vue +111 -0
- 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/TextureSize/App.vue +3 -3
- package/samples/VisibleSensorDemo/App.vue +92 -25
- package/utils/JsViewEngineWidget/MetroWidget/Const.js +11 -0
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +188 -80
- package/utils/JsViewEngineWidget/TemplateParser.js +89 -32
- package/utils/JsViewEngineWidget/WidgetCommon.js +3 -4
- package/utils/JsViewEngineWidget/index.js +3 -2
- package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +95 -12
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +25 -3
- package/utils/JsViewPlugin/JsvPlayer/index.js +22 -1
- package/utils/JsViewPlugin/JsvPlayer/version.js +4 -4
- package/utils/JsViewVueTools/JsvImpactTracer.js +113 -0
- package/utils/JsViewVueTools/index.js +2 -1
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +11 -1
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +203 -14
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -2
- package/utils/JsViewVueWidget/JsvInput/Cursor.vue +4 -2
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +13 -12
- package/utils/JsViewVueWidget/JsvMarquee.vue +178 -205
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +35 -27
- package/utils/JsViewVueWidget/JsvNinePatch.vue +1 -2
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +37 -41
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +282 -285
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +18 -2
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +22 -2
- package/utils/JsViewVueWidget/JsvTextBox.vue +35 -72
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +123 -46
- package/utils/JsViewVueWidget/JsvTextureAnim/index.js +9 -5
- package/utils/JsViewVueWidget/JsvTouchContainer.vue +3 -4
- package/utils/JsViewVueWidget/JsvVideo.vue +9 -12
- package/utils/JsViewVueWidget/index.js +2 -2
- package/utils/JsViewVueWidget/utils/index.js +8 -0
- package/utils/JsViewVueWidget/utils/text.js +19 -0
- package/utils/JsViewEngineWidget/MetroPage.js +0 -2128
- package/utils/JsViewEngineWidget/SimpleWidget/ContentView.vue +0 -51
- package/utils/JsViewEngineWidget/SimpleWidget/Dispatcher.js +0 -19
- package/utils/JsViewEngineWidget/SimpleWidget/DivWrapper.vue +0 -53
- package/utils/JsViewEngineWidget/SimpleWidget/ItemView.vue +0 -142
- package/utils/JsViewEngineWidget/SimpleWidget/RootView.vue +0 -140
- package/utils/JsViewEngineWidget/SimpleWidget/SimpleWidget.vue +0 -1629
|
@@ -4,12 +4,6 @@ export default {
|
|
|
4
4
|
props: {
|
|
5
5
|
text: String,
|
|
6
6
|
moveCount: Number,
|
|
7
|
-
sStyleToken: String,
|
|
8
|
-
sLayoutSet: Object,
|
|
9
|
-
sFontSetLeft40Top: Object,
|
|
10
|
-
sFontSetLeft40Center: Object,
|
|
11
|
-
sFontSetLeft40Bottom: Object,
|
|
12
|
-
sFontSetLeft80: Object,
|
|
13
7
|
},
|
|
14
8
|
components: { JsvTextBox },
|
|
15
9
|
};
|
|
@@ -33,8 +27,16 @@ export default {
|
|
|
33
27
|
</div>
|
|
34
28
|
<JsvTextBox
|
|
35
29
|
:verticalAlign="'top'"
|
|
36
|
-
:
|
|
37
|
-
|
|
30
|
+
:style="{
|
|
31
|
+
left: 0,
|
|
32
|
+
top: 0,
|
|
33
|
+
width: 400,
|
|
34
|
+
height: 300,
|
|
35
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
36
|
+
fontSize: '30px',
|
|
37
|
+
textAlign: 'left',
|
|
38
|
+
lineHeight: '40px',
|
|
39
|
+
}"
|
|
38
40
|
>
|
|
39
41
|
{{ `测试文字变化能引起刷新: [${moveCount}]\n[TL]${text}` }}
|
|
40
42
|
</JsvTextBox>
|
|
@@ -54,8 +56,16 @@ export default {
|
|
|
54
56
|
</div>
|
|
55
57
|
<JsvTextBox
|
|
56
58
|
:verticalAlign="'middle'"
|
|
57
|
-
:
|
|
58
|
-
|
|
59
|
+
:style="{
|
|
60
|
+
left: 410,
|
|
61
|
+
top: 0,
|
|
62
|
+
width: 400,
|
|
63
|
+
height: 300,
|
|
64
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
65
|
+
fontSize: '30px',
|
|
66
|
+
textAlign: 'left',
|
|
67
|
+
lineHeight: '40px',
|
|
68
|
+
}"
|
|
59
69
|
>
|
|
60
70
|
{{ `[ML]${text}` }}
|
|
61
71
|
</JsvTextBox>
|
|
@@ -75,8 +85,16 @@ export default {
|
|
|
75
85
|
</div>
|
|
76
86
|
<JsvTextBox
|
|
77
87
|
:verticalAlign="'bottom'"
|
|
78
|
-
:
|
|
79
|
-
|
|
88
|
+
:style="{
|
|
89
|
+
left: 820,
|
|
90
|
+
top: 0,
|
|
91
|
+
width: 400,
|
|
92
|
+
height: 300,
|
|
93
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
94
|
+
fontSize: '30px',
|
|
95
|
+
textAlign: 'left',
|
|
96
|
+
lineHeight: '40px',
|
|
97
|
+
}"
|
|
80
98
|
>
|
|
81
99
|
{{ `[BL]${text}` }}
|
|
82
100
|
</JsvTextBox>
|
|
@@ -96,14 +114,25 @@ export default {
|
|
|
96
114
|
</div>
|
|
97
115
|
<JsvTextBox
|
|
98
116
|
:verticalAlign="'top'"
|
|
99
|
-
:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
117
|
+
:style="{
|
|
118
|
+
left: 1240,
|
|
119
|
+
top: 0,
|
|
120
|
+
width: 500,
|
|
121
|
+
height: 300,
|
|
122
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
123
|
+
fontSize: '30px',
|
|
124
|
+
textAlign: 'left',
|
|
125
|
+
lineHeight: '80px',
|
|
126
|
+
}"
|
|
127
|
+
className="test"
|
|
105
128
|
>
|
|
106
129
|
{{ `[TL]${text}` }}
|
|
107
130
|
</JsvTextBox>
|
|
108
131
|
</div>
|
|
109
|
-
</template>
|
|
132
|
+
</template>
|
|
133
|
+
|
|
134
|
+
<style scoped>
|
|
135
|
+
.test {
|
|
136
|
+
color: #007788
|
|
137
|
+
}
|
|
138
|
+
</style>
|
|
@@ -3,7 +3,6 @@ import { JsvTextBox } from "jsview";
|
|
|
3
3
|
export default {
|
|
4
4
|
props: {
|
|
5
5
|
text: String,
|
|
6
|
-
sStyleToken: String,
|
|
7
6
|
},
|
|
8
7
|
components: { JsvTextBox },
|
|
9
8
|
};
|
|
@@ -27,22 +26,16 @@ export default {
|
|
|
27
26
|
</div>
|
|
28
27
|
<JsvTextBox
|
|
29
28
|
:verticalAlign="'top'"
|
|
30
|
-
:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
41
|
-
fontSize: '30px',
|
|
42
|
-
textAlign: 'left',
|
|
43
|
-
lineHeight: '80px',
|
|
44
|
-
},
|
|
45
|
-
]"
|
|
29
|
+
:style="{
|
|
30
|
+
left: 0,
|
|
31
|
+
top: 0,
|
|
32
|
+
width: 400,
|
|
33
|
+
height: 80,
|
|
34
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
35
|
+
fontSize: '30px',
|
|
36
|
+
textAlign: 'left',
|
|
37
|
+
lineHeight: '80px',
|
|
38
|
+
}"
|
|
46
39
|
>
|
|
47
40
|
{{ text }}
|
|
48
41
|
</JsvTextBox>
|
|
@@ -62,22 +55,16 @@ export default {
|
|
|
62
55
|
</div>
|
|
63
56
|
<JsvTextBox
|
|
64
57
|
:verticalAlign="'middle'"
|
|
65
|
-
:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
76
|
-
fontSize: '30px',
|
|
77
|
-
textAlign: 'center',
|
|
78
|
-
lineHeight: '80px',
|
|
79
|
-
},
|
|
80
|
-
]"
|
|
58
|
+
:style="{
|
|
59
|
+
left: 410,
|
|
60
|
+
top: 0,
|
|
61
|
+
width: 400,
|
|
62
|
+
height: 80,
|
|
63
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
64
|
+
fontSize: '30px',
|
|
65
|
+
textAlign: 'center',
|
|
66
|
+
lineHeight: '80px',
|
|
67
|
+
}"
|
|
81
68
|
>
|
|
82
69
|
{{ text }}
|
|
83
70
|
</JsvTextBox>
|
|
@@ -97,22 +84,16 @@ export default {
|
|
|
97
84
|
</div>
|
|
98
85
|
<JsvTextBox
|
|
99
86
|
:verticalAlign="'bottom'"
|
|
100
|
-
:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
111
|
-
fontSize: '30px',
|
|
112
|
-
textAlign: 'right',
|
|
113
|
-
lineHeight: '80px',
|
|
114
|
-
},
|
|
115
|
-
]"
|
|
87
|
+
:style="{
|
|
88
|
+
left: 820,
|
|
89
|
+
top: 0,
|
|
90
|
+
width: 400,
|
|
91
|
+
height: 80,
|
|
92
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
93
|
+
fontSize: '30px',
|
|
94
|
+
textAlign: 'right',
|
|
95
|
+
lineHeight: '80px',
|
|
96
|
+
}"
|
|
116
97
|
>
|
|
117
98
|
{{ text }}
|
|
118
99
|
</JsvTextBox>
|
|
@@ -3,10 +3,6 @@ import { JsvTextBox } from "jsview";
|
|
|
3
3
|
export default {
|
|
4
4
|
props: {
|
|
5
5
|
text: String,
|
|
6
|
-
sStyleToken: String,
|
|
7
|
-
sLayoutSet: Object,
|
|
8
|
-
sFontSetRight40: Object,
|
|
9
|
-
sFontSetRight80: Object,
|
|
10
6
|
},
|
|
11
7
|
components: { JsvTextBox },
|
|
12
8
|
};
|
|
@@ -30,8 +26,16 @@ export default {
|
|
|
30
26
|
</div>
|
|
31
27
|
<JsvTextBox
|
|
32
28
|
:verticalAlign="'top'"
|
|
33
|
-
:
|
|
34
|
-
|
|
29
|
+
:style="{
|
|
30
|
+
left: 0,
|
|
31
|
+
top: 0,
|
|
32
|
+
width: 400,
|
|
33
|
+
height: 300,
|
|
34
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
35
|
+
fontSize: '30px',
|
|
36
|
+
textAlign: 'right',
|
|
37
|
+
lineHeight: '40px',
|
|
38
|
+
}"
|
|
35
39
|
>
|
|
36
40
|
{{ `[TR]${text}` }}
|
|
37
41
|
</JsvTextBox>
|
|
@@ -51,8 +55,16 @@ export default {
|
|
|
51
55
|
</div>
|
|
52
56
|
<JsvTextBox
|
|
53
57
|
:verticalAlign="'middle'"
|
|
54
|
-
:
|
|
55
|
-
|
|
58
|
+
:style="{
|
|
59
|
+
left: 410,
|
|
60
|
+
top: 0,
|
|
61
|
+
width: 400,
|
|
62
|
+
height: 300,
|
|
63
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
64
|
+
fontSize: '30px',
|
|
65
|
+
textAlign: 'right',
|
|
66
|
+
lineHeight: '40px',
|
|
67
|
+
}"
|
|
56
68
|
>
|
|
57
69
|
{{ `[MR]${text}` }}
|
|
58
70
|
</JsvTextBox>
|
|
@@ -72,8 +84,16 @@ export default {
|
|
|
72
84
|
</div>
|
|
73
85
|
<JsvTextBox
|
|
74
86
|
:verticalAlign="'bottom'"
|
|
75
|
-
:
|
|
76
|
-
|
|
87
|
+
:style="{
|
|
88
|
+
left: 820,
|
|
89
|
+
top: 0,
|
|
90
|
+
width: 400,
|
|
91
|
+
height: 300,
|
|
92
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
93
|
+
fontSize: '30px',
|
|
94
|
+
textAlign: 'right',
|
|
95
|
+
lineHeight: '40px',
|
|
96
|
+
}"
|
|
77
97
|
>
|
|
78
98
|
{{ `[BR]${text}` }}
|
|
79
99
|
</JsvTextBox>
|
|
@@ -94,12 +114,16 @@ export default {
|
|
|
94
114
|
</div>
|
|
95
115
|
<JsvTextBox
|
|
96
116
|
:verticalAlign="'bottom'"
|
|
97
|
-
:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
117
|
+
:style="{
|
|
118
|
+
left: 1240,
|
|
119
|
+
top: 0,
|
|
120
|
+
width: 500,
|
|
121
|
+
height: 300,
|
|
122
|
+
backgroundColor: 'rgba(255,255,0,0.5)',
|
|
123
|
+
fontSize: '30px',
|
|
124
|
+
textAlign: 'right',
|
|
125
|
+
lineHeight: '80px',
|
|
126
|
+
}"
|
|
103
127
|
>
|
|
104
128
|
{{ `[BR]${text}` }}
|
|
105
129
|
</JsvTextBox>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 当TextData数据中有blur为0(不显示阴影)时,为了测试会报“StyleFormatCheck.js?058c:447 textShadow: blur shadow above 0(now=2 2 0 #00FF00)”错误
|
|
3
3
|
-->
|
|
4
4
|
<script>
|
|
5
|
-
import {
|
|
5
|
+
import { JsvTextBox } from "jsview";
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
components: {
|
|
@@ -32,11 +32,6 @@ export default {
|
|
|
32
32
|
textShadow: "4 4 0.5 #0000EF",
|
|
33
33
|
},
|
|
34
34
|
],
|
|
35
|
-
font_style: new JsvTextStyleClass({
|
|
36
|
-
fontSize: "35px",
|
|
37
|
-
textAlign: "center",
|
|
38
|
-
lineHeight: "40px",
|
|
39
|
-
}),
|
|
40
35
|
};
|
|
41
36
|
},
|
|
42
37
|
methods: {
|
|
@@ -77,17 +72,16 @@ export default {
|
|
|
77
72
|
</div>
|
|
78
73
|
<JsvTextBox
|
|
79
74
|
:verticalAlign="'middle'"
|
|
80
|
-
:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
]"
|
|
75
|
+
:style="{
|
|
76
|
+
top: 50,
|
|
77
|
+
width: 320,
|
|
78
|
+
height: 70,
|
|
79
|
+
textShadow: item.textShadow,
|
|
80
|
+
backgroundColor: item.id % 2 == 0 ? '#ffffee' : '#ffff10',
|
|
81
|
+
fontSize: '35px',
|
|
82
|
+
textAlign: 'center',
|
|
83
|
+
lineHeight: '40px',
|
|
84
|
+
}"
|
|
91
85
|
>
|
|
92
86
|
文字阴影
|
|
93
87
|
</JsvTextBox>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, 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
|
|
@@ -32,7 +32,7 @@ const onKeyDown = (ev) => {
|
|
|
32
32
|
</div>
|
|
33
33
|
<div class="leftFont top250">
|
|
34
34
|
{{
|
|
35
|
-
`指定尺寸加载\n
|
|
35
|
+
`指定尺寸加载\n内存占用由给定尺寸决定,图片质量基本没变,但更省内存`
|
|
36
36
|
}}
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
@@ -67,9 +67,9 @@ const onKeyDown = (ev) => {
|
|
|
67
67
|
<img alt="" class="graphSize top0" :src="pngDemo" />
|
|
68
68
|
<img
|
|
69
69
|
alt=""
|
|
70
|
+
:src="pngDemo"
|
|
70
71
|
class="graphSize top250"
|
|
71
72
|
jsvImgScaledownTex
|
|
72
|
-
:src="pngDemo"
|
|
73
73
|
/>
|
|
74
74
|
<div class="underFont">
|
|
75
75
|
{{ `png有透明图片\n指定尺寸有明显锯齿` }}
|
|
@@ -80,9 +80,9 @@ const onKeyDown = (ev) => {
|
|
|
80
80
|
<img alt="" class="graphSize top0" :src="pngNoAlphaDemo" />
|
|
81
81
|
<img
|
|
82
82
|
alt=""
|
|
83
|
+
:src="pngNoAlphaDemo"
|
|
83
84
|
class="graphSize top250"
|
|
84
85
|
jsvImgScaledownTex
|
|
85
|
-
:src="pngNoAlphaDemo"
|
|
86
86
|
/>
|
|
87
87
|
<div class="underFont">
|
|
88
88
|
{{ `png无透明图片` }}
|