This helps with visualizing what a camera contains in its frustum.
It visualizes the frustum of a camera using a LineSegments.


WebGL / camera
WebGL / extrude / splines

var camera = new v3d.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000); var helper = new v3d.CameraHelper(camera); scene.add(helper);


CameraHelper(camera : Camera)

camera -- The camera to visualize.

This create a new CameraHelper for the specified camera.


See the base LineSegments class for common properties.

.camera : Camera

The camera being visualized.

.pointMap : object

This contains the points used to visualize the camera.

.matrix : object

Reference to the camera.matrixWorld.

.matrixAutoUpdate : object

See Object3D.matrixAutoUpdate. Set to false here as the helper is using the camera's matrixWorld.


See the base LineSegments class for common methods.

.update () : null

Updates the helper based on the projectionMatrix of the camera.


For more info on how to obtain the source code of this module see this page.