Skip to main content

Class: CameraController

Core-API.CameraController

Hierarchy

Implements

Accessors

controls

get controls(): undefined | TCameraControls

Returns

undefined | TCameraControls

Implementation of

ICamera.controls

Defined in

webgi/src/core/threejs/CameraController.ts:33


isActiveCamera

get isActiveCamera(): boolean

Returns

boolean

Implementation of

ICamera.isActiveCamera

Defined in

webgi/src/core/threejs/CameraController.ts:49


target

get target(): Vector3

Returns

Vector3

Implementation of

ICamera.target

Defined in

webgi/src/core/threejs/CameraController.ts:53

set target(target): void

Parameters

NameType
targetVector3

Returns

void

Implementation of

ICamera.target

Defined in

webgi/src/core/threejs/CameraController.ts:57


position

get position(): Vector3

Returns

Vector3

Implementation of

ICamera.position

Defined in

webgi/src/core/threejs/CameraController.ts:63

set position(position): void

Parameters

NameType
positionVector3

Returns

void

Implementation of

ICamera.position

Defined in

webgi/src/core/threejs/CameraController.ts:66


name

get name(): string

Returns

string

Implementation of

ICamera.name

Defined in

webgi/src/core/threejs/CameraController.ts:72

set name(name): void

Parameters

NameType
namestring

Returns

void

Implementation of

ICamera.name

Defined in

webgi/src/core/threejs/CameraController.ts:75


interactionsEnabled

get interactionsEnabled(): boolean

Returns

boolean

Implementation of

ICamera.interactionsEnabled

Defined in

webgi/src/core/threejs/CameraController.ts:181

set interactionsEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Implementation of

ICamera.interactionsEnabled

Defined in

webgi/src/core/threejs/CameraController.ts:185


cameraObject

get cameraObject(): OrthographicCamera | PerspectiveCamera

Returns

OrthographicCamera | PerspectiveCamera

Implementation of

ICamera.cameraObject

Defined in

webgi/src/core/threejs/CameraController.ts:416


modelObject

get modelObject(): OrthographicCamera | PerspectiveCamera

Internal three.js Object3D instance (like Mesh, Group, etc)

Returns

OrthographicCamera | PerspectiveCamera

Implementation of

ICamera.modelObject

Defined in

webgi/src/core/threejs/CameraController.ts:420


visible

get visible(): boolean

Returns

boolean

Implementation of

ICamera.visible

Defined in

webgi/src/core/threejs/CameraController.ts:562

set visible(value): void

Parameters

NameType
valueboolean

Returns

void

Implementation of

ICamera.visible

Defined in

webgi/src/core/threejs/CameraController.ts:565

Methods

getControls

getControls<T>(): undefined | T

Type parameters

NameType
Textends ICameraControls<string, T>

Returns

undefined | T

Defined in

webgi/src/core/threejs/CameraController.ts:36


getCameraOptions

getCameraOptions(): IPerspectiveCameraOptions | IOrthographicCameraOptions

Returns

IPerspectiveCameraOptions | IOrthographicCameraOptions

Implementation of

ICamera.getCameraOptions

Defined in

webgi/src/core/threejs/CameraController.ts:79


setCameraOptions

setCameraOptions<T>(value, setDirty?): void

Type parameters

NameType
Textends Partial<IPerspectiveCameraOptions | IOrthographicCameraOptions>

Parameters

NameTypeDefault value
valueTundefined
setDirtybooleantrue

Returns

void

Implementation of

ICamera.setCameraOptions

Defined in

webgi/src/core/threejs/CameraController.ts:87


refreshAspect

refreshAspect(setDirty?): void

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Defined in

webgi/src/core/threejs/CameraController.ts:294


refreshTarget

refreshTarget(distanceFromTarget?): void

Parameters

NameTypeDefault value
distanceFromTargetnumber4

Returns

void

Implementation of

ICamera.refreshTarget

Defined in

webgi/src/core/threejs/CameraController.ts:298


setControlsCtor

setControlsCtor(key, ctor, replace?): void

Parameters

NameTypeDefault value
keystringundefined
ctorTControlsCtorundefined
replacebooleanfalse

Returns

void

Defined in

webgi/src/core/threejs/CameraController.ts:315


removeControlsCtor

removeControlsCtor(key): void

Parameters

NameType
keystring

Returns

void

Defined in

webgi/src/core/threejs/CameraController.ts:322


refreshCameraControls

refreshCameraControls(setDirty?): void

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Defined in

webgi/src/core/threejs/CameraController.ts:350


setDirty

setDirty(options?): void

Parameters

NameType
options?AnyOptions

Returns

void

Implementation of

ICamera.setDirty

Defined in

webgi/src/core/threejs/CameraController.ts:376


activateMain

activateMain(refresh?): void

Parameters

NameTypeDefault value
refreshbooleantrue

Returns

void

Implementation of

ICamera.activateMain

Defined in

webgi/src/core/threejs/CameraController.ts:392


deactivateMain

deactivateMain(refresh?): void

Parameters

NameTypeDefault value
refreshbooleantrue

Returns

void

Implementation of

ICamera.deactivateMain

Defined in

webgi/src/core/threejs/CameraController.ts:404


dispose

dispose(): void

Returns

void

Implementation of

ICamera.dispose

Defined in

webgi/src/core/threejs/CameraController.ts:487


targetUpdated

targetUpdated(setDirty?): void

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Implementation of

ICamera.targetUpdated

Defined in

webgi/src/core/threejs/CameraController.ts:492


positionUpdated

positionUpdated(setDirty?): void

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Implementation of

ICamera.positionUpdated

Defined in

webgi/src/core/threejs/CameraController.ts:507


positionTargetUpdated

positionTargetUpdated(setDirty?): void

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Defined in

webgi/src/core/threejs/CameraController.ts:512


copyFromCamera

copyFromCamera(camera, distanceFromTarget?): void

Parameters

NameTypeDefault value
cameraOrthographicCamera | PerspectiveCameraundefined
distanceFromTargetnumber4

Returns

void

Defined in

webgi/src/core/threejs/CameraController.ts:517


updateShaderProperties

updateShaderProperties(material): CameraController

Parameters

NameType
materialObject
material.definesRecord<string, undefined | string | number>
material.uniformsObject

Returns

CameraController

Implementation of

ICamera.updateShaderProperties

Defined in

webgi/src/core/threejs/CameraController.ts:530


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Implementation of

ICamera.toJSON

Defined in

webgi/src/core/threejs/CameraController.ts:540


fromJSON

fromJSON(data, meta?): null | CameraController

Parameters

NameType
dataany
meta?any

Returns

null | CameraController

Implementation of

ICamera.fromJSON

Defined in

webgi/src/core/threejs/CameraController.ts:545


refreshCameraOptions

refreshCameraOptions(setDirty?): void

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Defined in

webgi/src/core/threejs/CameraController.ts:556


addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
type"update"
listener(event: IEvent<"update">) => void

Returns

void

Implementation of

ICamera.addEventListener

Inherited from

SimpleEventDispatcher.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:48


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameType
type"update"
listener(event: IEvent<"update">) => void

Returns

boolean

Implementation of

ICamera.hasEventListener

Inherited from

SimpleEventDispatcher.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:56


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameType
type"update"
listener(event: IEvent<"update">) => void

Returns

void

Implementation of

ICamera.removeEventListener

Inherited from

SimpleEventDispatcher.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<"update">

Returns

void

Implementation of

ICamera.dispatchEvent

Inherited from

SimpleEventDispatcher.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74


_nearFarChanged

Protected _nearFarChanged(): void

Returns

void

Defined in

webgi/src/core/threejs/CameraController.ts:208

Properties

userData

userData: any = {}

Implementation of

ICamera.userData

Defined in

webgi/src/core/threejs/CameraController.ts:47


autoLookAtTarget

autoLookAtTarget: boolean = true

Defined in

webgi/src/core/threejs/CameraController.ts:195


near

near: number = 0.01

Implementation of

ICamera.near

Defined in

webgi/src/core/threejs/CameraController.ts:201


far

far: number = 50

Implementation of

ICamera.far

Defined in

webgi/src/core/threejs/CameraController.ts:206


uiConfig

uiConfig: UiObjectConfig<any, string>

Implementation of

ICamera.uiConfig

Defined in

webgi/src/core/threejs/CameraController.ts:462


assetType

assetType: "model"

Implementation of

ICamera.assetType

Defined in

webgi/src/core/threejs/CameraController.ts:485


uuid

Readonly uuid: string

Implementation of

ICamera.uuid

Defined in

webgi/src/core/threejs/CameraController.ts:560

Constructors

constructor

new CameraController(camera?, options?, domElement?)

Parameters

NameType
camera?OrthographicCamera | PerspectiveCamera
options?Partial<IPerspectiveCameraOptions | IOrthographicCameraOptions>
domElement?HTMLElement

Overrides

SimpleEventDispatcher.constructor

Defined in

webgi/src/core/threejs/CameraController.ts:240