Geometries you can use for debugging
Three.js comes with two helper geometries out of the box that make it easier to see the details or just the outline of a geometry:
THREE.EdgesGeometry
, which provides a geometry that only renders the edges of a geometryTHREE.WireFrameGeometry
, which renders just the geometry without showing any faces
First, let’s look at THREE.EdgesGeometry
.
THREE.EdgesGeometry
With THREE.EdgesGeometry
, you wrap an existing geometry, which is then rendered by just showing the edges and not the individual vertices and faces. An example of this is shown in the edges-geometry.html
example:
Figure 6.12 – EdgesGeometry only showing the edges, not the individual faces
In the previous screenshot, you can see that the outline of RoundedBoxGeometry
is shown, where we just see the edges. Since RoundedBoxGeometry
has smooth corners, those are shown when using THREE.EdgesGeometry
.
To use this geometry...