Creating a point cloud based on a geometry
An interesting feature of Three.js is that it also allows you to create point clouds. A point cloud isn't rendered as a solid geometry, but all the individual vertices are rendered as single points. In this recipe, we'll show you how to create such a point cloud based on an already existing geometry.
Getting ready
There are no additional steps required to start with this recipe. For the example we use in this recipe, however, we use an external model as the basis for our point cloud. We also use a camera control object, THREE.OrbitControls
, to make navigation around the example easier. If you want to use the camera control object yourself, you need to add the following JavaScript libraries to the scene ...
Get Three.js Cookbook 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.