I've been experimenting with scaling geometries on the y-axis, but I've run into an issue where my cube scales both up and down. I found that using mesh.transformY to animate the cube up by half of the scaling value can create the illusion of the cube scaling only upwards. I'm curious if there are other methods to achieve this effect?
var geometry = new THREE.BoxGeometry(1, 1, 1);
var mesh = new THREE.Mesh(geometry, new THREE.MeshPhongMaterial({
color: 0xffffff
}));
mesh.position.set(0, 2, 0);
mesh.scale.set(0.98, 0.95, 0.992);
mesh.castShadow = true;
scene.add(mesh);
var tween = new TWEEN.Tween(mesh.scale);
tween.to({y: 2}, 1000);
tween.easing(TWEEN.Easing.Elastic.InOut);
tween.yoyo(true);
tween.start();