Graphics Reference
In-Depth Information
Creating a point cloud from scratch
When you want to create a point cloud, you can pass in an existing geometry
and base the point cloud on it. In this recipe, we'll show you how you can create
THREE.Geometry from scratch and create a point cloud from it.
Getting ready
For this recipe, we don't require any additional JavaScript libraries and we don't
need to load external models, as we create our geometry from scratch. You can look
at the geometry we created by opening 06.02-create-point-system-from-
scratch.html in your browser. You will see something similar to the following
screenshot:
In the next section, we'll explain how to create this custom geometry and use it to-
gether with THREE.PointCloud .
How to do it...
The steps are pretty much the same as shown in the Creating a point cloud based on
a geometry recipe, except that first, we need to create our own custom geometry:
1. Creating a custom geometry is fairly easy:
var x = 100;
var y = 100;
Search WWH ::




Custom Search