This demo shows a THREE.CameraHelper()
object based on a
THREE.PerspectiveCamera()
object. Note that the camera is
not used for rendering the scene; it's what we're looking at,
not with. Its shape is a frustum, so I stored it in a variable
called frustumCamera
, just for clarity. The camera helper
draws the frustumCamera using brown lines.
This demo also shows a frustum drawn using yellow lines. This is one where my code calculates the exact geometry.
The two frustums match exactly if the camera viewpoints match, namely the AT and EYE positions and the UP vector.
It seems that this cameraHelper object always renders as if the viewpoint is the same, which is useful for this demo, but not the behavior in camera-api, so that's puzzling. TODO
Here is the function that sets up this camera: