@shijiu/jsview-vue 0.9.602 → 1.9.627
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/{target_core_revision.js → target_core_revision.mjs} +4 -4
- package/index.d.ts +1 -0
- package/index.js +1 -10
- package/loader/jsview-main.js +1 -1
- package/loader/loader.js +0 -1
- package/package.json +3 -3
- package/patches/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +17225 -2182
- package/patches/node_modules/@vue/compiler-sfc/dist/jsview-css-to-js.js +10 -12
- package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-format.js +5 -1
- package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-types.js +6 -1
- package/patches/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +6972 -7050
- package/patches/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +221 -117
- package/patches/node_modules/postcss-js/objectifier.js +4 -4
- package/samples/Basic/App.vue +2 -2
- package/samples/Basic/components/FontStyle.css +1 -1
- package/samples/Basic/components/anim/AnimGroup.vue +4 -4
- package/samples/Basic/components/div/DivGroup1.vue +4 -4
- package/samples/Basic/components/div/DivGroup2.vue +5 -5
- package/samples/Basic/components/img/ImageGroup.vue +2 -2
- package/samples/Basic/components/panel/Panel1.vue +6 -6
- package/samples/Basic/components/panel/Panel2.vue +2 -2
- package/samples/Basic/components/text/TextGroup1.vue +4 -4
- package/samples/Basic/components/text/TextGroup2.vue +2 -2
- package/samples/DemoHomepage/App.vue +1 -1
- package/samples/DemoHomepage/router.js +38 -33
- package/samples/DemoHomepage/views/Homepage.vue +2 -5
- package/samples/HashHistory/router.js +6 -6
- package/samples/SprayView/App.vue +2 -2
- package/samples/TextureAnimation/App2.vue +83 -0
- package/samples/TextureAnimation/assets/blackWhiteGrid.png +0 -0
- package/samples/TextureAnimation/assets/mask.png +0 -0
- package/samples/VideoDemo/App.vue +2 -2
- package/scripts/jsview-post-install.js +5 -5
- package/scripts/jsview-run-android.js +12 -11
- package/utils/JsViewEngineWidget/JsvFocusBlock.vue +56 -52
- package/utils/JsViewEngineWidget/JsvFocusManager.js +1 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +3 -2
- package/utils/JsViewPlugin/JsvPlayer/version.js +4 -4
- package/utils/JsViewVueTools/JsvHashHistory.js +12 -12
- package/utils/JsViewVueTools/index.d.ts +5 -1
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +203 -14
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +282 -285
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +127 -43
- package/utils/JsViewVueWidget/JsvTextureAnim/index.js +9 -5
- package/utils/JsViewVueWidget/JsvVideo.vue +9 -12
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +1 -1
- package/utils/JsViewVueWidget/index.js +2 -2
- package/utils/index.d.ts +3 -0
- package/utils/index.js +10 -0
- package/dom/jsv-browser-debug-dom.js_1 +0 -8
- package/dom/jsv-dom.js_1 +0 -6
- package/dom/jsv-forge-define.js_1 +0 -6
- package/patches/node_modules/@babel/preset-env/lib/available-plugins.js +0 -219
- package/patches/node_modules/@vue/cli-plugin-typescript/index.js +0 -100
- package/patches/node_modules/@vue/cli-service/lib/commands/serve.js +0 -395
- package/patches/node_modules/@vue/cli-service/lib/config/app.js +0 -272
- package/patches/node_modules/@vue/cli-service/lib/config/assets.js +0 -70
- package/patches/node_modules/@vue/cli-service/lib/config/base.js +0 -212
- package/patches/node_modules/vue-loader/dist/resolveScript.js +0 -70
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactive, onMounted, onBeforeUnmount } from "vue";
|
|
3
|
-
import ContentBlock from "../ContentBlock";
|
|
4
|
-
import AnimKeyframeBasic from "./AnimKeyframeBasic";
|
|
5
|
-
import AnimKeyframeComposite from "./AnimKeyframeComposite";
|
|
6
|
-
import AnimTransition from "./AnimTransition";
|
|
3
|
+
import ContentBlock from "../ContentBlock.vue";
|
|
4
|
+
import AnimKeyframeBasic from "./AnimKeyframeBasic.vue";
|
|
5
|
+
import AnimKeyframeComposite from "./AnimKeyframeComposite.vue";
|
|
6
|
+
import AnimTransition from "./AnimTransition.vue";
|
|
7
7
|
|
|
8
8
|
const props = defineProps({
|
|
9
9
|
contentClass: String,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ContentBlock from "../ContentBlock";
|
|
3
|
-
import DivBackground from "./DivBackground";
|
|
4
|
-
import DivClip from "./DivClip";
|
|
5
|
-
import DivLayout from "./DivLayout";
|
|
2
|
+
import ContentBlock from "../ContentBlock.vue";
|
|
3
|
+
import DivBackground from "./DivBackground.vue";
|
|
4
|
+
import DivClip from "./DivClip.vue";
|
|
5
|
+
import DivLayout from "./DivLayout.vue";
|
|
6
6
|
|
|
7
7
|
const props = defineProps({
|
|
8
8
|
contentClass: String,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ContentBlock from "../ContentBlock";
|
|
3
|
-
import DivCssScoped from "./DivCssScoped";
|
|
4
|
-
import DivCssVar from "./DivCssVar";
|
|
5
|
-
import DivRadius from "./DivRadius";
|
|
6
|
-
import DivTransform from "./DivTransform";
|
|
2
|
+
import ContentBlock from "../ContentBlock.vue";
|
|
3
|
+
import DivCssScoped from "./DivCssScoped.vue";
|
|
4
|
+
import DivCssVar from "./DivCssVar.vue";
|
|
5
|
+
import DivRadius from "./DivRadius.vue";
|
|
6
|
+
import DivTransform from "./DivTransform.vue";
|
|
7
7
|
|
|
8
8
|
const props = defineProps({
|
|
9
9
|
contentClass: String,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import TitleBar from "./TitleBar";
|
|
3
|
-
import DivGroup1 from "../div/DivGroup1";
|
|
4
|
-
import DivGroup2 from "../div/DivGroup2";
|
|
5
|
-
import TextGroup1 from "../text/TextGroup1";
|
|
6
|
-
import TextGroup2 from "../text/TextGroup2";
|
|
7
|
-
import AnimGroup from "../anim/AnimGroup";
|
|
2
|
+
import TitleBar from "./TitleBar.vue";
|
|
3
|
+
import DivGroup1 from "../div/DivGroup1.vue";
|
|
4
|
+
import DivGroup2 from "../div/DivGroup2.vue";
|
|
5
|
+
import TextGroup1 from "../text/TextGroup1.vue";
|
|
6
|
+
import TextGroup2 from "../text/TextGroup2.vue";
|
|
7
|
+
import AnimGroup from "../anim/AnimGroup.vue";
|
|
8
8
|
|
|
9
9
|
const props = defineProps({
|
|
10
10
|
panelClass: String,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import ContentBlock from "../ContentBlock";
|
|
3
|
-
import TextAlign from "./TextAlign";
|
|
4
|
-
import TextFontStyle from "./TextFontStyle";
|
|
5
|
-
import TextOverflow from "./TextOverflow";
|
|
2
|
+
import ContentBlock from "../ContentBlock.vue";
|
|
3
|
+
import TextAlign from "./TextAlign.vue";
|
|
4
|
+
import TextFontStyle from "./TextFontStyle.vue";
|
|
5
|
+
import TextOverflow from "./TextOverflow.vue";
|
|
6
6
|
|
|
7
7
|
const props = defineProps({
|
|
8
8
|
contentClass: String,
|
|
@@ -1,170 +1,175 @@
|
|
|
1
1
|
import { createRouter } from "vue-router";
|
|
2
|
-
import {
|
|
2
|
+
import { jsvCreateHashHistory } from "jsview";
|
|
3
3
|
|
|
4
4
|
const routeList = [
|
|
5
5
|
// 功能实例
|
|
6
6
|
{
|
|
7
7
|
name: "Home",
|
|
8
8
|
path: "/",
|
|
9
|
-
component: () => import("./views/Homepage"),
|
|
9
|
+
component: () => import("./views/Homepage.vue"),
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
name: "基础示例合集",
|
|
13
13
|
path: "/feature/Basic",
|
|
14
|
-
component: () => import("jsview/samples/Basic/App"),
|
|
14
|
+
component: () => import("jsview/samples/Basic/App.vue"),
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
name: "可视化变化通知",
|
|
18
18
|
path: "/feature/VisibleSensorDemo",
|
|
19
|
-
component: () => import("jsview/samples/VisibleSensorDemo/App"),
|
|
19
|
+
component: () => import("jsview/samples/VisibleSensorDemo/App.vue"),
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
name: "快速刷新的表格布局组件",
|
|
23
23
|
path: "/feature/GridDemo",
|
|
24
|
-
component: () => import("jsview/samples/GridDemo/App"),
|
|
24
|
+
component: () => import("jsview/samples/GridDemo/App.vue"),
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
name: ".9图焦点框漂移",
|
|
28
28
|
path: "/feature/NinePatchDemo",
|
|
29
|
-
component: () => import("jsview/samples/NinePatchDemo/App"),
|
|
29
|
+
component: () => import("jsview/samples/NinePatchDemo/App.vue"),
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
name: "视频",
|
|
33
33
|
path: "/feature/VideoDemo",
|
|
34
|
-
component: () => import("jsview/samples/VideoDemo/App"),
|
|
34
|
+
component: () => import("jsview/samples/VideoDemo/App.vue"),
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
name: "焦点切换demo",
|
|
38
38
|
path: "/feature/BasicFocusControl",
|
|
39
|
-
component: () => import("jsview/samples/BasicFocusControl/App"),
|
|
39
|
+
component: () => import("jsview/samples/BasicFocusControl/App.vue"),
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
name: "Hash方式路由切换",
|
|
43
43
|
path: "/feature/HashHistory",
|
|
44
44
|
props: { routePath: "/feature/HashHistory" },
|
|
45
|
-
component: () => import("jsview/samples/HashHistory/App"),
|
|
45
|
+
component: () => import("jsview/samples/HashHistory/App.vue"),
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
name: "翻牌游戏",
|
|
49
49
|
path: "/feature/FlipCard",
|
|
50
|
-
component: () => import("jsview/samples/FlipCard/App"),
|
|
50
|
+
component: () => import("jsview/samples/FlipCard/App.vue"),
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
name: "设置颜色空间",
|
|
54
54
|
path: "/feature/ColorSpace",
|
|
55
|
-
component: () => import("jsview/samples/ColorSpace/App"),
|
|
55
|
+
component: () => import("jsview/samples/ColorSpace/App.vue"),
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
name: "制定Texture尺寸",
|
|
59
59
|
path: "/feature/TextureSize",
|
|
60
|
-
component: () => import("jsview/samples/TextureSize/App"),
|
|
60
|
+
component: () => import("jsview/samples/TextureSize/App.vue"),
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
name: "动图",
|
|
64
64
|
path: "/feature/AnimPicture",
|
|
65
|
-
component: () => import("jsview/samples/AnimPicture/App"),
|
|
65
|
+
component: () => import("jsview/samples/AnimPicture/App.vue"),
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
name: "粒子效果",
|
|
69
69
|
path: "/feature/SprayView",
|
|
70
|
-
component: () => import("jsview/samples/SprayView/App"),
|
|
70
|
+
component: () => import("jsview/samples/SprayView/App.vue"),
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
name: "长文字",
|
|
74
74
|
path: "/feature/LongText",
|
|
75
|
-
component: () => import("jsview/samples/LongText/App"),
|
|
75
|
+
component: () => import("jsview/samples/LongText/App.vue"),
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
name: "长图片",
|
|
79
79
|
path: "/feature/LongImage",
|
|
80
|
-
component: () => import("jsview/samples/LongImage/App"),
|
|
80
|
+
component: () => import("jsview/samples/LongImage/App.vue"),
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
name: "二维码",
|
|
84
84
|
path: "/feature/QrcodeDemo",
|
|
85
|
-
component: () => import("jsview/samples/QrcodeDemo/App"),
|
|
85
|
+
component: () => import("jsview/samples/QrcodeDemo/App.vue"),
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
name: "文字阴影",
|
|
89
89
|
path: "/feature/TextShadowDemo",
|
|
90
|
-
component: () => import("jsview/samples/TextShadowDemo/App"),
|
|
90
|
+
component: () => import("jsview/samples/TextShadowDemo/App.vue"),
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
name: "多行文字区域内对齐",
|
|
94
94
|
path: "/feature/TextBox",
|
|
95
|
-
component: () => import("jsview/samples/TextBox/App"),
|
|
95
|
+
component: () => import("jsview/samples/TextBox/App.vue"),
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
name: "抛物运动写法样例",
|
|
99
99
|
path: "/feature/ThrowMoveDemo",
|
|
100
|
-
component: () => import("jsview/samples/ThrowMoveDemo/App"),
|
|
100
|
+
component: () => import("jsview/samples/ThrowMoveDemo/App.vue"),
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
name: "精灵图",
|
|
104
104
|
path: "/feature/SpriteImage",
|
|
105
|
-
component: () => import("jsview/samples/SpriteImage/App"),
|
|
105
|
+
component: () => import("jsview/samples/SpriteImage/App.vue"),
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
name: "文字滚动(标题跑马灯)",
|
|
109
109
|
path: "/feature/Marquee",
|
|
110
|
-
component: () => import("jsview/samples/Marquee/App"),
|
|
110
|
+
component: () => import("jsview/samples/Marquee/App.vue"),
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
name: "文字输入",
|
|
114
114
|
path: "/feature/Input",
|
|
115
|
-
component: () => import("jsview/samples/Input/App"),
|
|
115
|
+
component: () => import("jsview/samples/Input/App.vue"),
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
name: "拼图demo",
|
|
119
119
|
path: "/feature/MaskClip",
|
|
120
|
-
component: () => import("jsview/samples/MaskClip/App"),
|
|
120
|
+
component: () => import("jsview/samples/MaskClip/App.vue"),
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
name: "SoundPool",
|
|
124
124
|
path: "/feature/SoundPool",
|
|
125
|
-
component: () => import("jsview/samples/SoundPool/App"),
|
|
125
|
+
component: () => import("jsview/samples/SoundPool/App.vue"),
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
name: "TextureAnimation",
|
|
129
129
|
path: "/feature/TextureAnimation",
|
|
130
|
-
component: () => import("jsview/samples/TextureAnimation/App"),
|
|
130
|
+
component: () => import("jsview/samples/TextureAnimation/App.vue"),
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "TextureAnimation2",
|
|
134
|
+
path: "/feature/TextureAnimation2",
|
|
135
|
+
component: () => import("jsview/samples/TextureAnimation/App2.vue"),
|
|
131
136
|
},
|
|
132
137
|
{
|
|
133
138
|
name: "公祭日黑白效果",
|
|
134
139
|
path: "/feature/GrayDown",
|
|
135
|
-
component: () => import("jsview/samples/FilterDemo/App"),
|
|
140
|
+
component: () => import("jsview/samples/FilterDemo/App.vue"),
|
|
136
141
|
},
|
|
137
142
|
|
|
138
143
|
// MetroWidget示例
|
|
139
144
|
{
|
|
140
145
|
name: "简单示例",
|
|
141
146
|
path: "/metroWidget/Simple",
|
|
142
|
-
component: () => import("jsview/samples/MetroWidgetDemos/Simple/App"),
|
|
147
|
+
component: () => import("jsview/samples/MetroWidgetDemos/Simple/App.vue"),
|
|
143
148
|
},
|
|
144
149
|
{
|
|
145
150
|
name: "嵌套示例",
|
|
146
151
|
path: "/metroWidget/Advanced",
|
|
147
|
-
component: () => import("jsview/samples/MetroWidgetDemos/Advanced/App"),
|
|
152
|
+
component: () => import("jsview/samples/MetroWidgetDemos/Advanced/App.vue"),
|
|
148
153
|
},
|
|
149
154
|
{
|
|
150
155
|
name: "性能测试",
|
|
151
156
|
path: "/metroWidget/PerformanceTest",
|
|
152
157
|
component: () =>
|
|
153
|
-
import("jsview/samples/MetroWidgetDemos/PerformanceTest/App"),
|
|
158
|
+
import("jsview/samples/MetroWidgetDemos/PerformanceTest/App.vue"),
|
|
154
159
|
},
|
|
155
160
|
{
|
|
156
161
|
name: "乒乓模式",
|
|
157
162
|
path: "/metroWidget/PingPong",
|
|
158
163
|
component: () =>
|
|
159
|
-
import("jsview/samples/MetroWidgetDemos/PingPong/App"),
|
|
164
|
+
import("jsview/samples/MetroWidgetDemos/PingPong/App.vue"),
|
|
160
165
|
},
|
|
161
166
|
];
|
|
162
167
|
|
|
163
168
|
const router = createRouter({
|
|
164
|
-
// 浏览器调试和盒子上都可以使用类WebHashHistory的
|
|
169
|
+
// 浏览器调试和盒子上都可以使用类WebHashHistory的jsvCreateHashHistory(推荐)
|
|
165
170
|
// 或 createMemoryHistory;
|
|
166
171
|
// createWebHashHistory只能用于浏览器调试,盒子不支持
|
|
167
|
-
history:
|
|
172
|
+
history: jsvCreateHashHistory(),
|
|
168
173
|
routes: routeList,
|
|
169
174
|
});
|
|
170
175
|
|
|
@@ -115,7 +115,6 @@ export default {
|
|
|
115
115
|
},
|
|
116
116
|
},
|
|
117
117
|
created() {
|
|
118
|
-
console.log("cchtest homepage beforeCreated", localStorage.curTab);
|
|
119
118
|
if (typeof localStorage.curTab !== "undefined") {
|
|
120
119
|
this.tabId = parseInt(localStorage.curTab);
|
|
121
120
|
}
|
|
@@ -123,10 +122,8 @@ export default {
|
|
|
123
122
|
this.contentData = dataList[this.tabId];
|
|
124
123
|
},
|
|
125
124
|
mounted() {
|
|
126
|
-
console.log("cchtest homepage mounted", localStorage.curTab);
|
|
127
125
|
},
|
|
128
126
|
beforeUnmount() {
|
|
129
|
-
console.log("cchtest homePage beforeUnmount");
|
|
130
127
|
},
|
|
131
128
|
};
|
|
132
129
|
</script>
|
|
@@ -179,8 +176,8 @@ export default {
|
|
|
179
176
|
|
|
180
177
|
<style scoped>
|
|
181
178
|
.rootSize {
|
|
182
|
-
width:
|
|
183
|
-
height:
|
|
179
|
+
width: 1280;
|
|
180
|
+
height: 720;
|
|
184
181
|
background-color: #334c4c;
|
|
185
182
|
}
|
|
186
183
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { createRouter } from "vue-router";
|
|
2
|
-
import {
|
|
2
|
+
import { jsvCreateHashHistory } from "jsview";
|
|
3
3
|
|
|
4
4
|
const routeList = [
|
|
5
5
|
// 功能实例
|
|
6
6
|
{
|
|
7
7
|
name: "Home",
|
|
8
8
|
path: "/",
|
|
9
|
-
redirect: "/__MainJsvApp/MainPage",
|
|
9
|
+
redirect: "/__MainJsvApp/MainPage.vue",
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
name: "MainPage",
|
|
13
13
|
path: "/__MainJsvApp/MainPage",
|
|
14
|
-
component: () => import("./views/MainPage"),
|
|
14
|
+
component: () => import("./views/MainPage.vue"),
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
name: "SubPageFirst",
|
|
18
18
|
path: "/__MainJsvApp/SubPageFirst",
|
|
19
|
-
component: () => import("./views/SubPage"),
|
|
19
|
+
component: () => import("./views/SubPage.vue"),
|
|
20
20
|
props: {
|
|
21
21
|
name: "First",
|
|
22
22
|
jumpTo: "Second",
|
|
@@ -25,7 +25,7 @@ const routeList = [
|
|
|
25
25
|
{
|
|
26
26
|
name: "SubPageSecond",
|
|
27
27
|
path: "/__MainJsvApp/SubPageSecond",
|
|
28
|
-
component: () => import("./views/SubPage"),
|
|
28
|
+
component: () => import("./views/SubPage.vue"),
|
|
29
29
|
props: {
|
|
30
30
|
name: "Second",
|
|
31
31
|
jumpTo: "First",
|
|
@@ -34,7 +34,7 @@ const routeList = [
|
|
|
34
34
|
];
|
|
35
35
|
|
|
36
36
|
const router = createRouter({
|
|
37
|
-
history:
|
|
37
|
+
history: jsvCreateHashHistory(),
|
|
38
38
|
routes: routeList,
|
|
39
39
|
});
|
|
40
40
|
|
|
@@ -0,0 +1,83 @@
|
|
|
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/swipLight.png";
|
|
13
|
+
import mask from "./assets/mask.png";
|
|
14
|
+
|
|
15
|
+
const getRandom = (start, end) => {
|
|
16
|
+
return Math.round(Math.random() * (end - start) + start);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const router = useRouter();
|
|
20
|
+
const width = ref(300);
|
|
21
|
+
const height = ref(200);
|
|
22
|
+
const left = ref(50);
|
|
23
|
+
const top = ref(50);
|
|
24
|
+
const rotateAnimation =
|
|
25
|
+
"{from {transform: rotate3d(0,0,1,0);} to {transform: rotate3d(0,0,1,360deg);}}";
|
|
26
|
+
|
|
27
|
+
const ninePatchDecorator = {
|
|
28
|
+
type: DECORATE_NINEPATCH_ALPHA_MIX,
|
|
29
|
+
url: `url(${mask})`,
|
|
30
|
+
imageWidth: 86,
|
|
31
|
+
centerWidth: 2,
|
|
32
|
+
borderOutset: 0,
|
|
33
|
+
animTime: 0.5,
|
|
34
|
+
};
|
|
35
|
+
const texCoord = ref({
|
|
36
|
+
width: 400,
|
|
37
|
+
height: 400,
|
|
38
|
+
});
|
|
39
|
+
const onKeyDown = (ev) => {
|
|
40
|
+
// 8:Backspace, 27:Escape, 10000:盒子返回键
|
|
41
|
+
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
42
|
+
router?.go(-1); // 有router时,是从DemoHomepage进入,回退
|
|
43
|
+
} else if (ev.keyCode == 13) {
|
|
44
|
+
left.value = getRandom(50, 400);
|
|
45
|
+
top.value = getRandom(50, 200);
|
|
46
|
+
width.value = getRandom(100, 300);
|
|
47
|
+
height.value = getRandom(100, 300);
|
|
48
|
+
texCoord.value = {
|
|
49
|
+
width: Math.max(width.value, height.value) * 1.414,
|
|
50
|
+
height: Math.max(width.value, height.value) * 1.414,
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return true;
|
|
54
|
+
};
|
|
55
|
+
</script>
|
|
56
|
+
<template>
|
|
57
|
+
<jsv-focus-block
|
|
58
|
+
autoFocus
|
|
59
|
+
:onKeyDown="onKeyDown"
|
|
60
|
+
:style="{
|
|
61
|
+
width: 1280,
|
|
62
|
+
height: 720,
|
|
63
|
+
backgroundImage: 'https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/BackgroundLongmao.jpg',
|
|
64
|
+
}"
|
|
65
|
+
>
|
|
66
|
+
<div>
|
|
67
|
+
<jsv-texture-anim
|
|
68
|
+
ref="textureAnim1"
|
|
69
|
+
:src="img"
|
|
70
|
+
:left="left"
|
|
71
|
+
:top="top"
|
|
72
|
+
:width="width"
|
|
73
|
+
:height="height"
|
|
74
|
+
:texCoord="texCoord"
|
|
75
|
+
:animation="rotateAnimation"
|
|
76
|
+
:duration="2000"
|
|
77
|
+
:repeat="-1"
|
|
78
|
+
:autoStart="true"
|
|
79
|
+
:decorate="ninePatchDecorator"
|
|
80
|
+
></jsv-texture-anim>
|
|
81
|
+
</div>
|
|
82
|
+
</jsv-focus-block>
|
|
83
|
+
</template>
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { provide, reactive, ref, watch } from "vue";
|
|
3
|
-
import Controllor from "./components/Controllor";
|
|
4
|
-
import VideoFrame from "./components/VideoFrame";
|
|
3
|
+
import Controllor from "./components/Controllor.vue";
|
|
4
|
+
import VideoFrame from "./components/VideoFrame.vue";
|
|
5
5
|
|
|
6
6
|
const Caption = {
|
|
7
7
|
offscreenVideo:
|
|
@@ -47,9 +47,9 @@ function installPatches(options) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
async function printRevision(options) {
|
|
50
|
-
const jsveiwVersionFile = options.jsviewDir + '/dom/target_core_revision.
|
|
50
|
+
const jsveiwVersionFile = options.jsviewDir + '/dom/target_core_revision.mjs';
|
|
51
51
|
|
|
52
|
-
const jsviewTargetVersion =
|
|
52
|
+
const { default: jsviewTargetVersion } = await import(jsveiwVersionFile);
|
|
53
53
|
|
|
54
54
|
console.log('**************************************************');
|
|
55
55
|
console.log('* Update revision to:');
|
|
@@ -84,14 +84,14 @@ function main() {
|
|
|
84
84
|
const options = {};
|
|
85
85
|
options.projectDir = process.cwd();
|
|
86
86
|
options.modulesDir = path.resolve(options.projectDir, 'node_modules');
|
|
87
|
-
options.jsviewDir = path.resolve(options.modulesDir, '@shijiu
|
|
87
|
+
options.jsviewDir = path.resolve(options.modulesDir, '@shijiu', 'jsview-vue');
|
|
88
88
|
options.patchesDir = path.resolve(options.jsviewDir, 'patches');
|
|
89
89
|
options.distDir = path.resolve(options.projectDir, 'dist');
|
|
90
90
|
|
|
91
91
|
checkNpmCommand();
|
|
92
92
|
|
|
93
|
-
checkPackageVersion(options, 'vue', '3.2.
|
|
94
|
-
checkPackageVersion(options, '@vue/compiler-sfc', '3.2.
|
|
93
|
+
checkPackageVersion(options, 'vue', '3.2.37');
|
|
94
|
+
checkPackageVersion(options, '@vue/compiler-sfc', '3.2.37');
|
|
95
95
|
|
|
96
96
|
installPatches(options);
|
|
97
97
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const childProcess = require('child_process');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
|
|
6
|
-
function getOptions() {
|
|
6
|
+
async function getOptions() {
|
|
7
7
|
const options = {
|
|
8
8
|
androidPackage: "com.qcode.jsview.sample_demo/com.qcode.jsview.sample.SingleActivity",
|
|
9
9
|
coreRevision: null,
|
|
@@ -15,17 +15,18 @@ function getOptions() {
|
|
|
15
15
|
options.androidPackage = process.argv[2];
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
18
|
+
const projectDir = process.cwd();
|
|
19
|
+
const modulesDir = path.resolve(projectDir, 'node_modules');
|
|
20
|
+
const jsviewDir = path.resolve(modulesDir, '@shijiu', 'jsview-vue');
|
|
21
|
+
const jsveiwVersionFile = path.resolve(jsviewDir, 'dom', 'target_core_revision.mjs');
|
|
22
|
+
const { default: jsviewTargetVersion } = await import(jsveiwVersionFile);
|
|
22
23
|
options.coreRevision = jsviewTargetVersion.CoreRevision;
|
|
23
24
|
options.jseUrl = jsviewTargetVersion.JseUrl;
|
|
24
25
|
|
|
25
|
-
const homepageUrlFile = path.resolve(
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
options.homepageUrl =
|
|
26
|
+
const homepageUrlFile = path.resolve(modulesDir, '.vite', 'jsview', 'network.mjs');
|
|
27
|
+
let { default: homepageDomain } = await import(homepageUrlFile);
|
|
28
|
+
homepageDomain = homepageDomain.replace(/\u001b\[.*?m/g, '')
|
|
29
|
+
options.homepageUrl = homepageDomain + "js/main.jsv.js";
|
|
29
30
|
|
|
30
31
|
return options;
|
|
31
32
|
}
|
|
@@ -54,8 +55,8 @@ function androidStartActivity(options) {
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
|
|
57
|
-
function main() {
|
|
58
|
-
const options = getOptions();
|
|
58
|
+
async function main() {
|
|
59
|
+
const options = await getOptions();
|
|
59
60
|
|
|
60
61
|
printRevision(options);
|
|
61
62
|
|