How to dynamically change the radius of a mesh based on the TubeGeometry at runtime.
Here is how I create the mesh:
var points = new THREE.SplineCurve3([
new THREE.Vector3(source.x, source.y, source.z),
new THREE.Vector3(target.x, target.y, target.z)
]);
var geometry = new THREE.TubeGeometry(points, 10, 1, 10, false, false);
geometry.dynamic = true;
var material = new THREE.MeshLambertMaterial({color:0x0000cc});
var mesh = new THREE.Mesh(geometry, material);
And here how I try to update the radius of the tube:
var geometry = mesh.geometry;
geometry.radius = 200;
geometry.verticesNeedUpdate = true;
mesh.updateMatrix();
Unfortunately it does not update the tube radius. How is it done correctly? Is it possible at all?