FORGE. Camera

new Camera(viewer)

A FORGE.Camera tells the renderer wich part of the scene to render.
Parameters:
Name Type Description
viewer FORGE.Viewer FORGE.Viewer reference.
Source:

Extends

Members

(static, constant) DEFAULT_CONFIG :CameraConfig

Camera default configuration in degrees like in the json configuration.
Type:
  • CameraConfig
Source:

(static, constant) RADIUS :number

Camera default radius for parallax.
Type:
  • number
Source:

(readonly) alive :boolean

Get the alive flag value of the object.
Type:
  • boolean
Inherited From:
Source:

(readonly) animation :FORGE.CameraAnimation

Get camera animation manager.
Type:
Source:

(readonly) className :string

Get the class name of the object.
Type:
  • string
Inherited From:
Source:

config :CameraConfig

Get and set the camera configuration (default min & max for all angles yaw, pitch, roll and fov).
Type:
  • CameraConfig
Source:

data :*

Get and set any custom data you want to associate to this object.
Type:
  • *
Inherited From:
Source:

debug :boolean

Get and set the debug flag.
Type:
  • boolean
Inherited From:
Source:

(readonly) flat :THREE.OrthographicCamera

Get the flat THREE.OrthographicCamera of the camera.
Type:
  • THREE.OrthographicCamera
Source:

fov :number

Get and set the fov value in degree.
Type:
  • number
Source:

(readonly) fovMax :number

Get the fov max value. Return the most restrictive value between the camera value and the view value.
Type:
  • number
Source:

(readonly) fovMin :number

Get the fov min value. Return the most restrictive value between the camera value and the view value.
Type:
  • number
Source:

(readonly) gaze :FORGE.CameraGaze

Get the camera gaze.
Type:
Source:

(readonly) keep :boolean

Get the keep flag
Type:
  • boolean
Source:

(readonly) left :THREE.PerspectiveCamera

Get the left camera.
Type:
  • THREE.PerspectiveCamera
Source:

(readonly) main :THREE.PerspectiveCamera

Get the main THREE.PerspectiveCamera of the camera.
Type:
  • THREE.PerspectiveCamera
Source:

modelView :THREE.Matrix4

Get the modelView of the camera.
Type:
  • THREE.Matrix4
Source:

(readonly) modelViewInverse :THREE.Matrix4

Get the modelViewInverse of the camera.
Type:
  • THREE.Matrix4
Source:

(readonly) onChange :FORGE.EventDispatcher

Get the "onChange" FORGE.EventDispatcher of the camera.
Type:
Source:

(readonly) onDestroy :FORGE.EventDispatcher

Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
Inherited From:
Source:

(readonly) onFovChange :FORGE.EventDispatcher

Get the "onFovChange" FORGE.EventDispatcher of the camera.
Type:
Source:

(readonly) onOrientationChange :FORGE.EventDispatcher

Get the "onOrientationChange" FORGE.EventDispatcher of the camera.
Type:
Source:

parallax :number

Get/Set parallax setting.
Type:
  • number
Source:

(readonly) perspectiveCameraRadius :number

Get the THREE.PerspectiveCamera radius.
Type:
  • number
Source:

pitch :number

Get and set the pitch value in degree.
Type:
  • number
Source:

(readonly) pitchMax :number

Get the pitch max value. Return the most restrictive value between the camera value and the view value.
Type:
  • number
Source:

(readonly) pitchMin :number

Get the pitch min value. Return the most restrictive value between the camera value and the view value.
Type:
  • number
Source:

(readonly) quaternion :THREE.Quaternion

Get/set quaternion rotation object of the camera. Setter will update internal quaternion object
Type:
  • THREE.Quaternion
Source:
Get the right camera.
Type:
  • THREE.PerspectiveCamera
Source:

roll :number

Get and set the roll value in degree.
Type:
  • number
Source:

(readonly) rollMax :number

Get the roll max value. Return the most restrictive value between the camera value and the view value.
Type:
  • number
Source:

(readonly) rollMin :number

Get the roll min value. Return the most restrictive value between the camera value and the view value.
Type:
  • number
Source:

(readonly) tags :Array

Get the tags associated to this object.
Type:
  • Array
Inherited From:
Source:

(readonly) uid :string

Get the uid of the object.
Type:
  • string
Inherited From:
Source:

warning :boolean

Get and set the warning flag.
Type:
  • boolean
Inherited From:
Source:

yaw :number

Get and set the yaw value in degree.
Type:
  • number
Source:

(readonly) yawMax :number

Get the yaw max value. Return the most restrictive value between the camera value and the view value.
Type:
  • number
Source:

(readonly) yawMin :number

Get the yaw min value. Return the most restrictive value between the camera value and the view value.
Type:
  • number
Source:

Methods

destroy()

Destroy sequence.
Overrides:
Source:

load(config)

Load a camera configuration.
Parameters:
Name Type Description
config CameraConfig The camera configuration to load.
Source:

log(value)

Basic log method, log a string in the console if debug is enabled.
Parameters:
Name Type Description
value * The value you want to log in the console.
Inherited From:
Source:

lookAt(yawopt, nullable, pitchopt, nullable, rollopt, nullable, fovopt, nullable, durationMSopt, cancelRollopt, easingopt)

Set the Camera to look at a specified point into the yaw/pitch/roll space.
Parameters:
Name Type Attributes Default Description
yaw number <optional>
<nullable>
Euler yaw angle (deg)
pitch number <optional>
<nullable>
Euler pitch angle (deg)
roll number <optional>
<nullable>
Euler roll angle (deg)
fov number <optional>
<nullable>
Field of view (deg)
durationMS number <optional>
Rotation animation duration ms (undefined or zero means immediat effect)
cancelRoll boolean <optional>
false If set to true, roll will be cancelled (always at 0).
If false an auto roll movement will be done by the camera for a more natural movement effect.
easing string <optional>
Easing method name (default to FORGE.EasingType.LINEAR).
Source:

update()

Update routine called by render manager before rendering a frame. All internals should be up to date.
Source:

warn(valuenullable)

Basic warn method, log a warn string in the console if warning is enabled.
Parameters:
Name Type Attributes Description
value string | Object <nullable>
The value you want to warn in the console.
Inherited From:
Source:

FORGE. Camera

Members
Methods