Pārlūkot izejas kodu

Merge branch 'master' of https://git.cocorobo.cn/CocoRoboLabs/cocoroboBlockly

jack 3 gadi atpakaļ
vecāks
revīzija
b8f65b2cda

+ 2 - 2
dist/index.html

@@ -1,4 +1,4 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>cocoroboblockly</title><link href=/static/css/app.98184957e84d054f9f1561e5a9b4a607.css rel=stylesheet></head><style>@charset "utf-8";
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>cocoroboblockly</title><link href=/static/css/app.f86854be4ee9c5e97bb1453693fa347e.css rel=stylesheet></head><style>@charset "utf-8";
 
   div::-webkit-scrollbar {
     /*滚动条整体样式*/
@@ -42,4 +42,4 @@
     height: 100%;
     width: 100%;
     background: #e6eaf0;
-  }</style><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.3c6b2bad42ad70623b45.js></script><script type=text/javascript src=/static/js/app.c8ee6331ccfc92520fcb.js></script></body></html>
+  }</style><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.f4bd45f3d47d29774415.js></script><script type=text/javascript src=/static/js/app.7a92bce901e1c6573151.js></script></body></html>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.98184957e84d054f9f1561e5a9b4a607.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.f86854be4ee9c5e97bb1453693fa347e.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/css/app.f86854be4ee9c5e97bb1453693fa347e.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.7a92bce901e1c6573151.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.7a92bce901e1c6573151.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.c8ee6331ccfc92520fcb.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.c8ee6331ccfc92520fcb.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/manifest.2ae2e69a05c33dfc65f8.js.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/vendor.f4bd45f3d47d29774415.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/vendor.f4bd45f3d47d29774415.js.map


+ 62 - 20
src/components/functionFan.vue

@@ -130,6 +130,24 @@
     </el-dialog> -->
   </div>
 </template>
+<style>
+.as {
+  animation: myfirst 1s linear infinite;
+}
+
+.asn {
+  transform: rotate(0deg);
+}
+
+@keyframes myfirst {
+  0% {
+    transform: rotate(0deg);
+  }
+  100% {
+    transform: rotate(360deg);
+  }
+}
+</style>
 <script>
 //import tracking from "@/assets/js/tracking-min.js";
 //import "@/assets/js/face-min.js";
@@ -224,11 +242,19 @@ export default {
       this.isZuan = true;
       this.isCamera = true;
       let video = this.$refs["video"];
-      setInterval(() => {
-        this.handsFind(video);
+      let that = this
+      var f = window.requestAnimationFrame(function () {
+        window.cancelAnimationFrame(f);
+        setTimeout(function () {
+          that.handsFind(video);
+          that.start();
+        }, 3000);
+      });
+      // setInterval(() => {
+      //   this.handsFind(video);
 
-        // window.requestAnimationFrame(this.start);
-      }, 1000);
+      //   // window.requestAnimationFrame(this.start);
+      // }, 1000);
     },
     zhuan(num) {
       var _fan = this.$refs.fan;
@@ -308,40 +334,55 @@ export default {
             return;
           }
           this.hand = 1;
-          if (this.timer) {
-            clearInterval(this.timer);
-            this.timer = null;
-            this.zhuan(buNum);
+
+          if (buNum) {
+            this.$refs.fan.style = `animation: myfirst ${50/buNum}s linear infinite`;
           } else {
-            this.zhuan(buNum);
+            this.$refs.fan.style = "";
           }
+          // if (this.timer) {
+          //   clearInterval(this.timer);
+          //   this.timer = null;
+          //   this.zhuan(buNum);
+          // } else {
+          //   this.zhuan(buNum);
+          // }
         } else if (_58y < 1 && _912y < 1 && _1316y < 1 && _1720y < 1) {
           console.log("石头");
           if (this.hand == 2) {
             return;
           }
           this.hand = 2;
-          if (this.timer) {
-            clearInterval(this.timer);
-            this.timer = null;
-            this.zhuan(sNum);
+          if (sNum) {
+            this.$refs.fan.style = `animation: myfirst ${50/sNum}s linear infinite`;
           } else {
-            this.zhuan(sNum);
+            this.$refs.fan.style = "";
           }
+          // if (this.timer) {
+          //   clearInterval(this.timer);
+          //   this.timer = null;
+          //   this.zhuan(sNum);
+          // } else {
+          //   this.zhuan(sNum);
+          // }
         } else if (_58y > 1 && _912y > 1 && _1316y < 1 && _1720y < 1) {
           console.log("剪刀");
           if (this.hand == 3) {
             return;
           }
           this.hand = 3;
-
-          if (this.timer) {
-            clearInterval(this.timer);
-            this.timer = null;
-            this.zhuan(jNum);
+          if (jNum) {
+            this.$refs.fan.style = `animation: myfirst ${50/jNum}s linear infinite`;
           } else {
-            this.zhuan(jNum);
+            this.$refs.fan.style = "";
           }
+          // if (this.timer) {
+          //   clearInterval(this.timer);
+          //   this.timer = null;
+          //   this.zhuan(jNum);
+          // } else {
+          //   this.zhuan(jNum);
+          // }
         }
       }
     },
@@ -409,6 +450,7 @@ export default {
 
       this.isZuan = false;
       clearInterval(this.timer);
+      this.$refs.fan.style = ""
       this.timer = null;
       this.hand = 0;
     },

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels