소스 검색

fix: speed action

xzw 4 달 전
부모
커밋
5e3d6e1f99
3개의 변경된 파일9개의 추가작업 그리고 8개의 파일을 삭제
  1. 5 4
      public/lib/potree/potree.js
  2. 1 1
      public/lib/potree/potree.js.map
  3. 3 3
      src/sdk/cover/index.js

+ 5 - 4
public/lib/potree/potree.js

@@ -69409,6 +69409,7 @@
 	    this.addEventListener('transformChanged', updatePlayInSight);
 	  }
 	  setContent(type, src, autoSize) {
+	    src = location.origin + '/' + src;
 	    this.mediaType = type;
 	    var loadDone = () => {
 	      autoSize && this.autoSize();
@@ -82312,7 +82313,7 @@
 	        var endTime1 = key.time + key.dur + fadeTimeEnd;
 	        if (time < startTime1 || time > endTime1) return 0; //out bound 
 
-	        key.tempTime_ = time - startTime1; //当前动作时间
+	        key.tempTime_ = time - startTime1; //当前动作时间 
 
 	        var startTime2 = key.time + fadeTimeStart;
 	        var endTime2 = key.time + key.dur - fadeTimeEnd;
@@ -82350,9 +82351,9 @@
 	        }
 	      });
 	      animateActions.forEach(action => {
-	        action.setEffectiveTimeScale(action.tempSW_.scale);
+	        action.setEffectiveTimeScale(action.tempSW_.scale); //speed  只有没paused时有效
 	        action.setEffectiveWeight(action.tempSW_.weight);
-	        action.time = action.tempSW_.time % action._clip.duration;
+	        action.time = action.tempSW_.time % (action._clip.duration / action.tempSW_.scale) * action.tempSW_.scale; //只有paused时有效
 	      });
 
 	      //model.mixer.timeScale = 1 ;
@@ -82361,7 +82362,7 @@
 	      if (_loop2(_keys3)) continue;
 	    }
 	    {
-	      if (this.camFollowObject) {
+	      if (this.camFollowObject && !viewer.scene.monitors.some(e => e.isWatching)) {
 	        //in front of model 
 	        if (this.camFollowObject.length == 1) {
 	          var _model4 = this.camFollowObject[0];

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
public/lib/potree/potree.js.map


+ 3 - 3
src/sdk/cover/index.js

@@ -1486,7 +1486,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
                         },
                         // 添加模型帧
                         addFrame(frame){//pose  至少会有一个关键帧作为默认姿态
-                            console.log('addFrame',frame)
+                            //console.log('addFrame',frame)
                             let key = {time: frame.time }
                             let getData = (data)=>{
                                 let info = {}
@@ -1519,7 +1519,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
                             return  model.actions?.map(e=>e._clip.name)
                         },
                         addAction(frame){// 添加模型动作
-                            console.log('addAction',frame)
+                            //console.log('addAction',frame)
                             let key = Object.assign({},frame) 
                                 key.weight = key.amplitude || 1 //幅度
                                 key.speed = key.speed || 1
@@ -1565,7 +1565,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
                         },
 
                         addPath(frame){//走路路径
-                            console.log('addPath',frame)
+                            //console.log('addPath',frame)
                             let key = Object.assign({},frame) 
                                 key.path = key.path.path
                                 key.dur = key.duration