FluxCameras

FluxCameras

new FluxCameras(width, height)

Class for managing multiple cameras used in a viewport.
Parameters:
Name Type Description
width Number Width of the viewport
height Number Height of the viewport
Source:

Members

(static) VIEWS :Object

Enumeration of all possible views for the camera. Values are perspective, top, bottom, front, back, right, left.
Type:
  • Object
Source:

Methods

(static) cameraFromJSON(camera, data)

Rehydrate camera instance from an object property tree.
Parameters:
Name Type Description
camera THREE.camera The camera to receive data
data Object The data to parse and apply
Source:

(static) cameraToJSON(camera) → {Object}

Extract only relevant properties from a camera
Parameters:
Name Type Description
camera THREE.Camera The camera source
Source:
Returns:
The camera data
Type
Object

fromJSON(serializableCameras)

Update the corresponding cameras in this object from a serialized object.
Parameters:
Name Type Description
serializableCameras Object The camera data to use.
Source:

getCamera() → {THREE.Camera}

Get the current camera object
Source:
Returns:
The current camera
Type
THREE.Camera

setView(view)

Set which camera view to use (ex perspective, top etc.).
Parameters:
Name Type Description
view FluxCameras.VIEWS The new view mode
Source:

toJSON() → {Object}

Make serializable by pruning all references and building an object property tree
Source:
Returns:
The simplified model
Type
Object

updateCamera(width, height)

Recompute derived state when the camera is changed.
Parameters:
Name Type Description
width Number Width of the viewport (used to calculate aspect ratio)
height Number Height of the viewport (used to calculate aspect ratio)
Source: