xzw hace 1 mes
padre
commit
7e06cbe6d2
Se han modificado 3 ficheros con 16 adiciones y 23 borrados
  1. 11 20
      public/static/data/data.json
  2. 0 0
      public/static/models/2/3.png
  3. 5 3
      src/modelViewer/Viewer.js

+ 11 - 20
public/static/data/data.json

@@ -283,7 +283,12 @@
           "x": -0.5612790292806588,
           "y": -0.8267091018852216,
           "z": -0.038960392065421234
-        }
+        },
+        "action": [ 
+          {
+            "tex": { "show": [3], "dur": 2000 }
+          }
+        ]
       }
     ],
     "model": {
@@ -304,7 +309,7 @@
           "z": -1.6918808507048055
         }
       },
-      "texNum": 3
+      "texNum": 4
     }
   },
   {
@@ -1007,32 +1012,18 @@
         },
         "action": [
           {
-            "view": {
-              "yaw": 1.5660555017884197,
-              "pitch": -0.15980038518837816,
-              "radius": 514.8982623532802,
-              "target": {
-                "x": -1.9245945531984034,
-                "y": 0.02714036927829966,
-                "z": 0.9794479420044553
-              },
-              "endPos": {
-                "x": 506.4076704682443,
-                "y": -2.382791999110268,
-                "z": 82.91064553228063
-              }
-            }
+            "view": {"yaw":-1.6080877665935247,"pitch":-0.03899058736120012,"radius":473.70640136501794,"target":{"x":-1.9245945531979487,"y":0.027140369278296106,"z":0.9794479420040858},"endPos":{"x":-474.94186991581375,"y":17.67481696490342,"z":19.444859215491608}}
           },
           {
             "rotate": {
               "axis": "z",
-              "angle": 6.283185307179586,
+              "angle": -6.283185307179586,
               "dur": 16000,
               "dontWait": 1
             }
           },
-          { "tex": { "show": [0], "dur": 4000, "delay": 0.05 } },
-          { "tex": { "show": [1], "dur": 4500, "delay": 0.2 } },
+          { "tex": { "show": [1], "dur": 3000, "delay": 0  } },
+          { "tex": { "show": [0], "dur": 4000, "delay": 0.1 } },
           { "tex": { "show": [2], "dur": 3000, "delay": 0.25 } }
         ]
       },

public/static/models/2/3-没用到好像.png → public/static/models/2/3.png


+ 5 - 3
src/modelViewer/Viewer.js

@@ -709,10 +709,12 @@ export class Viewer extends ViewerBase {
                     
                     console.log('tex', t, action)
                     
-                    t.show && this.highlightTex(t.show, 0.8, t.dur || 2000, callback,  t.delay, t.shine)  
-                    t.hide && this.highlightTex(t.hide, 0,   t.dur || 1200, callback,  t.delay, t.shine )  
+                    t.show && this.highlightTex(t.show, 0.8, t.dur || 2000, t.dontWait ? null : callback,  t.delay, t.shine)  
+                    t.hide && this.highlightTex(t.hide, 0,   t.dur || 1200, t.dontWait ? null : callback,  t.delay, t.shine )  
                     
-                
+                    if(t.dontWait){
+                        setTimeout(callback, 1)//挂起,直接执行后面的
+                    }
                 }
                 
                 if(action.combineModel){