Can anyone assist me in creating a random sphere using particles in three.js?
I can create different shapes with particles, but I'm unsure how to generate them randomly.
Here's my current code:
// point cloud geometry
var geometry = new THREE.SphereGeometry(100, 100, 100);
material = new THREE.PointCloudMaterial({
size: 1,
transparent: true,
opacity: 0.5,
color: 0xffffff
});
// point cloud
var pointCloud = new THREE.PointCloud(geometry, material);
//add to scene
scene.add( pointCloud );
Any suggestions are greatly appreciated.