My task involves creating a tetrahedron with a radius of 3
// create a tetrahedron
var tetGeometry = new THREE.TetrahedronGeometry(3);
var tetMaterial = new THREE.MeshLambertMaterial(
{color: 0x20f020, transparent:true, opacity:0.6});
tet = new THREE.Mesh(tetGeometry, tetMaterial);
tet.name='tet';
tet.castShadow = true;
As the project progresses, I need the tetrahedron to increase in size:
// change tetrahedron size
scene.getObjectByName('tet').radius = control.tetrahedronRadius;
However, this method is ineffective.
// modify vertices
scene.getObjectByName('tet').detail = control.tetrahedronVertices;
Even this approach fails to yield results.
scene.getObjectByName('tet').verticesNeedUpdate;
Unfortunately, this does not provide a solution either.
So, how can I adjust the radius and vertices of a tetrahedron (or any geometry)?
The documentation mentions various properties such as:
- Geometry
- .dynamic
- .morph
- .verticesNeedUpdate
- .scale
Moreover, there are discussions about bones, skeletons, and skinned meshes for animating geometries.
What is the recommended approach for altering these aspects of geometries?
How can I effectively enlarge the radius of a Tetrahedron or manipulate the number of vertices to transform it into a different polyhedron?