three.js create sphere

68

three.js create sphere -

const geometry = new THREE.SphereGeometry(5, 32, 32); // (radius, widthSegments, heightSegments)
const material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
const sphere = new THREE.Mesh(geometry, material);
scene.add(sphere);

Comments

Submit
0 Comments