diff --git a/src/assets/images/hand_1.png b/src/assets/images/hand_1.png new file mode 100644 index 0000000..0eb6ba0 Binary files /dev/null and b/src/assets/images/hand_1.png differ diff --git a/src/assets/images/hand_2.png b/src/assets/images/hand_2.png new file mode 100644 index 0000000..40ef3e6 Binary files /dev/null and b/src/assets/images/hand_2.png differ diff --git a/src/assets/images/hand_3.png b/src/assets/images/hand_3.png new file mode 100644 index 0000000..e508afa Binary files /dev/null and b/src/assets/images/hand_3.png differ diff --git a/src/assets/images/suggbg.png b/src/assets/images/suggbg.png new file mode 100644 index 0000000..651c2e7 Binary files /dev/null and b/src/assets/images/suggbg.png differ diff --git a/src/assets/images/suggbg2.png b/src/assets/images/suggbg2.png new file mode 100644 index 0000000..eee712e Binary files /dev/null and b/src/assets/images/suggbg2.png differ diff --git a/src/page/index/HandTrack/index.vue b/src/page/index/HandTrack/index.vue index 9a8a530..c3da005 100644 --- a/src/page/index/HandTrack/index.vue +++ b/src/page/index/HandTrack/index.vue @@ -19,11 +19,11 @@ ref="showVideoBtn" @click="initVideo($event)" > - 开启摄像头 + 开启 -
+
当前进度: {{ progressText }}..
@@ -32,9 +32,25 @@
+ +
+
+
+
+
+ + +
+

请在镜头前尝试做出以下手势

+
+
+ -
请在浏览器中打开
-
您的系统版本过低
+
@@ -351,14 +459,15 @@ export default { align-content: center; align-items: center; .video { - position: relative; - z-index: 0; + .paLayout(50%,50%,auto,100%,0); + transform: translate(-50%, -50%); // transform: scaleX(-1); - width: 750px; - height: auto; + // width: 750px; + display: none; // height: 700px; } .info-dialog { + visibility: hidden; .paLayout(0,0, 50%,130px,2); background-color: rgba(255, 255, 255, 0.25); border-radius: 0 0 30px 0; @@ -383,14 +492,61 @@ export default { .progress { } } + .hand-dialog { + visibility: hidden; + .paLayout(0,0,100%,100%,11); + background-color: rgba(0, 0, 0, 0.4); + color: #fff; + text-align: center; + line-height: 50px; + font-size: 30px; + display: flex; + flex-direction: column; + justify-content: center; + align-content: center; + align-items: center; + pointer-events: none; + .hand { + margin-top: 20px; + .prLayout(160px*2.5,277px*2.5); + .bg-norepeat("hand_1","png"); + background-size: contain; + &.hand-1 { + .bg-norepeat("hand_1","png"); + background-size: contain; + } + &.hand-2 { + .bg-norepeat("hand_2","png"); + background-size: contain; + } + } + } .btn { - .paCenterBottom(200px,280px,80px,2); - background-color: #fff; + .paCenterBottom(50%,280px,80px,2); + background-color: rgba(255, 255, 255, 0.85); line-height: 40px; text-align: center; border-radius: 8px; font-size: 25px; } + .progress-bar { + visibility: hidden; + .paCenter(50%,80%,40px,12); + margin-top: -20px; + border: 1px solid #fff; + border-radius: 20px; + padding: 4px; + .bar { + .prLayout(100%,100%); + border-radius: 12px; + overflow: hidden; + .progress { + width: 0%; + height: 100%; + background-color: #fff; + } + } + } .unsuit-dialog { visibility: hidden; .paCenterBottom(0, 100%,80px,10); diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index be5141a..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "strict": true, - "strictNullChecks": true, - "esModuleInterop": true, - "experimentalDecorators": true - }, - "exclude": [ - "node_modules", - "dist" - ] -} \ No newline at end of file diff --git a/vue.config.js b/vue.config.js index 8a47eec..43a0d29 100644 --- a/vue.config.js +++ b/vue.config.js @@ -49,23 +49,23 @@ module.exports = { // .set("base", resolve("baseConfig")) // .set("public", resolve("public")); - if (process.env.NODE_ENV !== "test") { - config.module.rule('compile') - .test(/\.js$/) - .include - .add(resolve('src')) - .add(resolve('node_modules')) - .end() - .use('babel') - .loader('babel-loader') - .options({ - presets: [ - ['@babel/preset-env', { - modules: false - }] - ] - }); - } + // if (process.env.NODE_ENV !== "test") { + config.module.rule('compile') + .test(/\.js$/) + .include + .add(resolve('src')) + .add(resolve('node_modules')) + .end() + .use('babel') + .loader('babel-loader') + .options({ + presets: [ + ['@babel/preset-env', { + modules: false + }] + ] + }); + // } }, configureWebpack: config => { @@ -107,19 +107,19 @@ module.exports = { config.module.rules.push( // ts加载 - { - test: /\.tsx?$/, - use: [ - { - loader: 'ts-loader', - options: { - transpileOnly: true, - appendTsSuffixTo: [/\.vue$/], - happyPackMode: true // 这个改为true - } - } - ] - }, + // { + // test: /\.tsx?$/, + // use: [ + // { + // loader: 'ts-loader', + // options: { + // transpileOnly: true, + // appendTsSuffixTo: [/\.vue$/], + // happyPackMode: true // 这个改为true + // } + // } + // ] + // }, //wasm加载 { test: /\.wasm$/i,