Browse Source

solwed down building entering

Bachir Soussi Chiadmi 3 years ago
parent
commit
424e60111b
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/App.vue

+ 4 - 2
src/App.vue

@@ -336,9 +336,10 @@ export default {
           this.opened_vnode = vnode
 
           // get new camera target pos
-          let toPos
+          let toPos, tweenTime
           if (object.name === 'Content') {
             toPos = { ...object.position }
+            tweenTime = 3000
             this.controls.lat = 0
             switch (vnode.face) {
               case 'left':
@@ -367,12 +368,13 @@ export default {
           } else if (object.name === 'Project') {
             toPos = { ...object.userData.position }
             toPos.y = 2
+            tweenTime = 7000
           }
           // toPos.y = 5
           let camPos = { ...this.camera.position }
           new TWEEN.Tween(camPos)
             .easing(TWEEN.Easing.Quadratic.InOut)
-            .to(toPos, 3000)
+            .to(toPos, tweenTime)
             .onUpdate(function () {
               // console.log('tween update', this._object)
               cam.position.set(this._object.x, this._object.y, this._object.z)