0
votes

Webgl Three.js tween and java script Im getting unexpected results from Tween the x or y property of an object, i have no errors and the object is scaling but with out animation.

 var scale = {y:0};         
 var tween = new TWEEN.Tween( cube.scale.y ).to( { y: 10 }, 3000 ).easing(
 TWEEN.Easing.Cubic.Out ).start();

im trying to get the cube to stretch to the right height with the animation, but currently it just snaps straight to the scale-y.

1
Im thinking i may have to move the vertices, but i thought scale would auto complete this for me, any help - Careen
can you post a fiddle or similar - Shiva
as far as i know i may have to use morph targets and move the vertices using tweens then update the vertices in the rendering position.the other though is im having problems with some of my tweens anyways so may have encountered a bug of my own - Careen

1 Answers

1
votes

You should use the whole object in Tween, like this

new TWEEN.Tween( cube.scale ).to( { y: 10 }, 3000 )