如何在运行时根据 TubeGeometry 动态更改网格的半径。
这是我创建网格的方法:
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);
在这里我如何尝试更新管的半径:
var geometry = mesh.geometry;
geometry.radius = 200;
geometry.verticesNeedUpdate = true;
mesh.updateMatrix();
不幸的是,它不会更新管半径。它是如何正确完成的?有可能吗?