Parcourir la source

fix: 又调导览 音频动画

xzw il y a 3 ans
Parent
commit
76e51e3361

BIN
public/static/images/ani/HH_talk01.png


BIN
public/static/images/ani/HH_talk02.png


BIN
public/static/images/ani/HH_talk03.png


BIN
public/static/images/ani/HH_walk02.png


BIN
public/static/images/ani/ZZ_J.png


BIN
public/static/images/ani/ZZ_talk01.png


BIN
public/static/images/ani/ZZ_talk02.png


BIN
public/static/images/ani/ZZ_talk03.png


BIN
public/static/images/ani/ZZ_walk02.png


+ 95 - 22
public/static/js/main_2020_show.js

@@ -385,11 +385,13 @@ var createGuideAni = function(model){
     sprite2.visible = false;
     
     animations.push({
+        name:'HH',
         idleAnimation:[animation1, animation5, animation7],
         walkAnimation:animation3,
         mesh:sprite1,
         //currentIdleAnimation:
     }, {
+        name:'ZZ',
         idleAnimation:[animation2, animation6, animation8],
         walkAnimation:animation4,
         mesh:sprite2,
@@ -401,13 +403,60 @@ var getRandomItem = function(arr){
     return arr[Math.round(arr.length * random) % arr.length]
 }
 
+var musicGroup = {
+    'ZZ':[
+        "https://///super.4dage.com/data/1204/edit/20220708_103655975.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220711_092443845.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114240478.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114334743.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114347280.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114503575.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114516835.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114553878.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114604570.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114645360.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114658600.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114741742.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114753943.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220722_111147250.mp3",
+    ],
+    
+    'HH':[
+        
+        "https://///super.4dage.com/data/1204/edit/20220708_114250269.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114306331.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114432502.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114443468.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114453488.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114526161.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114534281.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114543407.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114615079.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114625749.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114634288.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114710872.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114720891.mp3",
+        "https://///super.4dage.com/data/1204/edit/20220708_114731411.mp3",
+    ]
+    
+    
+    
+}
+
+
+
 var startIdle = function(){
+    
+    var musicInfo = player.model.heroLocations[player.director.destinationItem[0]].musicInfo
+    console.log(musicInfo)
+    var musicSrc = musicInfo && musicInfo.music
+    
     animations.forEach((e,i)=>{
         e.mesh.visible = true; 
         let a = getRandomItem(e.idleAnimation)
         e.mesh.material.map = a.animation.texture
         GifTexDeal.stop(e.walkAnimation)
-        GifTexDeal.start(a )
+        musicGroup[e.name].some(e=>e.includes(musicSrc)) && GifTexDeal.start(a )
         e.currentIdleAnimation = a
         
         //console.log('animationIdle', i, 'use',  e.idleAnimation.indexOf(a))
@@ -439,24 +488,8 @@ var walkGap = 0.4;
 
 const spriteDisToCamera = 2.8
 const disTpCameras = [ 
+     
     /* {
-        items: [[7,0],[7,1], [22,0],[22,1],  [19,0],[19,1], [26,0], [26,1]],   
-        dis: 1.6
-    }
-    ,
-    {
-        items: [[15,0]],  //137
-        dis: 2.1,
-        gap:-1
-    }
-    ,
-    {
-        items: [[15,1]],  //137
-        dis: 2.1,
-        gap:-0.56
-    } */
-    
-    {
         items: [[29,0],[30,0],[31,0],[32,0],    [28,0]],   //29蓝色隧道口 32隧道尾部
         dis: 2.3, gap: 0.55
     },
@@ -469,8 +502,45 @@ const disTpCameras = [
     {
         items: [[21,0] ],   //站到大众创业杆子后方了
          dis: 2.1,  gap: 0.45 
-    }
+    } */
     
+    {
+        items: [[3,0],[6,0]],   
+            y: 0.4 
+    },
+    {
+        items: [ [5,0],[4,0] ],   
+            y: 0.59
+    },
+    {
+        items: [ [8,0],[9,0],[10,0],[11,0] ],   
+            y: 0.3
+    },
+    
+    
+    
+    //站到黄色展板上了
+    {
+        items: [[13,0]],   
+         dis:3.4, gap: 0.55, y: 0.1
+    },
+    {
+        items: [[14,0],[15,0],[16,0],[18,0]],   
+         dis:3.4, gap: 0.55, y: -0.6
+    },
+    {
+        items: [[19,0],[20,0],[21,0]],   
+         dis:5, gap: 0.55 , y: -0.6
+    },
+    {
+        items: [[23,0],[24,0] ],   
+         dis:2.4,  gap: 0.55,  y: -0.4
+    },
+    
+    {
+        items: [ [25,0],[26,0]],   
+          gap: 0.55,  y: -0.45
+    },
 ]
 
 
@@ -499,7 +569,7 @@ var getDisToCamera = function(){
         }
         
         result.y = item.y
-        console.log('result',result)
+        //console.log('result',result)
     }
     
      
@@ -24458,7 +24528,7 @@ window.Modernizr = function(n, e, t) {
                 //var currentLocation = this.model.heroLocations[this.director.currentItem[0]] 
                 
                 var rotTime
-                if(currentLocation.rotTime == void 0 || currentLocation.rotTime == ''){
+                /* if(currentLocation.rotTime == void 0 || currentLocation.rotTime == ''){
                     var restChildCount = currentLocation0.heroLocations ? (currentLocation0.heroLocations.length-this.director.currentItem[1]-1) : 0
                     var hasMusic = currentLocation0 && currentLocation0.musicInfo.music
                     if(hasMusic){
@@ -24476,7 +24546,10 @@ window.Modernizr = function(n, e, t) {
                 }else{
                     rotTime = currentLocation.rotTime * 1000
                     Log("rotTime "+rotTime +" at item "+this.director.currentItem,"#E8E") 
-                }
+                } */
+                 
+                rotTime = 600 
+                 
                  
                 startIdle();  
                 this.path.waitNextStep(e, function() {