Game Development Reference
In-Depth Information
The DirectionalLight object is positioned at the peak of the red cone, the ends of
the yellow boxes are at the shadowCameraNear and shadowCameraFar distances, and
the edges of the box are the size of the frustum. For PointLights , the entire frustum
is a cone.
Renderers
Earlier, we switched from CanvasRenderer to WebGLRenderer in order to support
shadows and fog. As a rule of thumb, WebGLRenderer is faster and has the most
features, while CanvasRenderer has fewer features but broader browser support.
One particularly nice feature of WebGLRenderer is that it supports antialiasing to
smooth out jagged edges. We can enable this for our cityscape by passing the option
in to the renderer constructor:
renderer = new THREE.WebGLRenderer({antialias: true});
With that, our cityscape is finally complete, as shown in the next screenshot:
A completed city
 
Search WWH ::




Custom Search