Having successfully created one animation loop with tweenjs, I am now eager to develop an infinite moving animation from top to bottom. However, I am facing some bugs in my code and require assistance! You can check out the code here.
var group_position_1 = new TWEEN.Tween(group.position)
.to({ y: THREE.Math.degToRad(-20)}, 1000)
.yoyo(true)
.repeat(1)
.easing(TWEEN.Easing.Linear.None)
.onStart(() => {
})
.onUpdate(() => {
})
.onComplete(() => {
group_position_2.start()
})
var group_position_2 = new TWEEN.Tween(group.position)
.to({ y: THREE.Math.degToRad(-30)}, 1000)
.yoyo(true)
.repeat(1)
.easing(TWEEN.Easing.Linear.None)
.onStart(() => {
})
.onUpdate(() => {
})
.onComplete(() => {
group_position_1.start()
})