Particles, THREE.PointCloud, and THREE.PointCloudMaterial

At the end of the previous section, we quickly introduced THREE.PointCloud. The constructor of THREE.PointCloud takes two properties: a geometry and a material. The material is used to color and texture the particles (as we'll see later on), and the geometry defines where the individual particles are positioned. Each vertex and each point used to define the geometry is shown as a particle. When we create THREE.PointCloud based on THREE.BoxGeometry, we get 8 particles, one for each corner of the cube. Normally, though, you won't create THREE.PointCloud from one of the standard Three.js geometries, but add the vertices manually to a geometry created from scratch (or use an externally loaded ...

Get Learning Three.js – the JavaScript 3D Library for WebGL - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.