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