If I use the global TWEEN.update() this animation works fine. But if I use the group and update it in this way the animation is not working. Why is this the case as the Tween js documentation is suggesting this implementation?
private warningBlinkingWithInterval(seconds) {
let tweenGrp = new TWEEN.Group();
let delta = this.clock.getDelta();
let blink = Math.floor(this.timeSec1 / seconds) & 1;
let isBlink = Boolean(blink);
console.log(isBlink);
if (this.previousFrameBlinked !== isBlink) {
if (isBlink) {
this.warningHarnesses.forEach(harn => {
let resizeCircleUp = new TWEEN.Tween(harn.children[4].scale, tweenGrp).to({ x: 1, y: 1 }, seconds * 1000).easing(TWEEN.Easing.Quadratic.InOut).start();
});
} else {
this.warningHarnesses.forEach(harn => {
let resizeCircleDown = new TWEEN.Tween(harn.children[4].scale, tweenGrp).to({ x: 0.2, y: 0.2 }, seconds * 1000).easing(TWEEN.Easing.Quadratic.InOut).start();
});
}
}
//console.log(tweenGrp.getAll());
this.previousFrameBlinked = isBlink;
this.timeSec1 += delta;
tweenGrp.update();
}