I am trying to animate a sphere, with increasing radii. here are the relevant snippets of my code ..
function create_sphere(){
var sphereMaterial = new THREE.MeshLambertMaterial(
{
color: 0xCC0000
});
var radius=2,segments=50,rings=50;
sphere_geometry = new THREE.SphereGeometry(radius, segments, rings)
sphere = new THREE.Mesh(sphere_geometry,sphereMaterial);
sphere.position.y = -10;
sphere.position.needsUpdate = true;
sphere.geometry.dynamic = true;
}
and here is animate function , which I am calling ..
function animate(){
sphere.position.y+=0.1;
sphere.geometry.radius +=0.1;
scene.add(sphere);
renderer.render(scene, camera);
requestAnimationFrame(animate);
}
But I am unable to increase the radius of the sphere, although it is moving perfectly in y-direction,(implying code is working, and error free). Any suggestions what I might be wrong at ..