solwed down building entering
This commit is contained in:
+4
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user