Three.js-图形元素大小

时间:2018-07-26 11:47:31

标签: three.js

如何更改球体的元素大小以得到结果的十边形?这种几何形状是否甚至允许更改元素大小? codepen

上的示例代码

an example of a figure

var vector = new THREE.Vector3();
var spherical = new THREE.Spherical();
for ( var i = 0, l = objects.length; i < l; i ++ ) {
var phi = Math.acos( -1 + ( 2 * i ) / l );
 var theta = Math.sqrt( l * Math.PI ) * phi;

      var object = new THREE.Object3D();
      spherical.set(1000, phi, theta );
      object.position.setFromSpherical( spherical );
      vector.copy( object.position ).multiplyScalar( 2 );
      object.lookAt( vector );
    }

0 个答案:

没有答案