Skip to main content

Class: CameraController

Core-API.CameraController

Hierarchy

  • SimpleEventDispatcher<"update">

    CameraController

Implements

Accessors

controls

get controls(): undefined | TCameraControls

Returns

undefined | TCameraControls

Implementation of

ICamera.controls

Defined in

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


userData

get userData(): any

Returns

any

Implementation of

ICamera.userData

Defined in

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

set userData(value): void

Parameters

NameType
valueany

Returns

void

Implementation of

ICamera.userData

Defined in

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


isActiveCamera

get isActiveCamera(): boolean

Returns

boolean

Implementation of

ICamera.isActiveCamera

Defined in

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


target

get target(): Vector3

Returns

Vector3

Implementation of

ICamera.target

Defined in

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

set target(target): void

Parameters

NameType
targetVector3

Returns

void

Implementation of

ICamera.target

Defined in

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


position

get position(): Vector3

Returns

Vector3

Implementation of

ICamera.position

Defined in

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

set position(position): void

Parameters

NameType
positionVector3

Returns

void

Implementation of

ICamera.position

Defined in

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


name

get name(): string

Returns

string

Implementation of

ICamera.name

Defined in

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

set name(name): void

Parameters

NameType
namestring

Returns

void

Implementation of

ICamera.name

Defined in

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


interactionsEnabled

get interactionsEnabled(): boolean

If interactions are enabled for this camera. It can be disabled by some code or plugin. see also setInteractions

Returns

boolean

Implementation of

ICamera.interactionsEnabled

Defined in

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

set interactionsEnabled(value): void

If interactions are enabled for this camera. It can be disabled by some code or plugin. see also setInteractions

deprecated

Parameters

NameType
valueboolean

Returns

void

Implementation of

ICamera.interactionsEnabled

Defined in

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


cameraObject

get cameraObject(): OrthographicCamera | PerspectiveCamera

Returns

OrthographicCamera | PerspectiveCamera

Implementation of

ICamera.cameraObject

Defined in

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


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:463


visible

get visible(): boolean

Returns

boolean

Implementation of

ICamera.visible

Defined in

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

set visible(value): void

Parameters

NameType
valueboolean

Returns

void

Implementation of

ICamera.visible

Defined in

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

Methods

getControls

getControls<T>(): undefined | T

Type parameters

NameType
Textends ICameraControls<string, T>

Returns

undefined | T

Defined in

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


getCameraOptions

getCameraOptions(): IPerspectiveCameraOptions | IOrthographicCameraOptions

Returns

IPerspectiveCameraOptions | IOrthographicCameraOptions

Implementation of

ICamera.getCameraOptions

Defined in

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


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:97


setInteractions

setInteractions(enabled, by): void

Parameters

NameType
enabledboolean
bystring

Returns

void

Implementation of

ICamera.setInteractions

Defined in

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


refreshAspect

refreshAspect(setDirty?): void

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Defined in

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


refreshTarget

refreshTarget(distanceFromTarget?): void

Parameters

NameTypeDefault value
distanceFromTargetnumber4

Returns

void

Implementation of

ICamera.refreshTarget

Defined in

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


setControlsCtor

setControlsCtor(key, ctor, replace?): void

Parameters

NameTypeDefault value
keystringundefined
ctorTControlsCtorundefined
replacebooleanfalse

Returns

void

Defined in

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


removeControlsCtor

removeControlsCtor(key): void

Parameters

NameType
keystring

Returns

void

Defined in

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


refreshCameraControls

refreshCameraControls(setDirty?): void

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Defined in

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


setDirty

setDirty(options?): void

Parameters

NameType
options?AnyOptions

Returns

void

Implementation of

ICamera.setDirty

Defined in

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


activateMain

activateMain(refresh?): void

Parameters

NameTypeDefault value
refreshbooleantrue

Returns

void

Implementation of

ICamera.activateMain

Defined in

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


deactivateMain

deactivateMain(refresh?): void

Parameters

NameTypeDefault value
refreshbooleantrue

Returns

void

Implementation of

ICamera.deactivateMain

Defined in

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


dispose

dispose(): void

Returns

void

Implementation of

ICamera.dispose

Defined in

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


targetUpdated

targetUpdated(setDirty?): void

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Implementation of

ICamera.targetUpdated

Defined in

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


positionUpdated

positionUpdated(setDirty?): void

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Implementation of

ICamera.positionUpdated

Defined in

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


positionTargetUpdated

positionTargetUpdated(setDirty?): void

deprecated - use positionUpdated instead

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Defined in

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


copyFromCamera

copyFromCamera(camera, distanceFromTarget?): void

Parameters

NameTypeDefault value
cameraOrthographicCamera | PerspectiveCameraundefined
distanceFromTargetnumber4

Returns

void

Defined in

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


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:606


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Implementation of

ICamera.toJSON

Defined in

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


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:623


refreshCameraOptions

refreshCameraOptions(setDirty?): void

Parameters

NameTypeDefault value
setDirtybooleantrue

Returns

void

Defined in

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


_nearFarChanged

Protected _nearFarChanged(): void

Returns

void

Defined in

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

Properties

autoLookAtTarget

autoLookAtTarget: boolean = false

Defined in

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


near

near: number = 0.01

Implementation of

ICamera.near

Defined in

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


far

far: number = 50

Implementation of

ICamera.far

Defined in

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


uiConfig

uiConfig: UiObjectConfig<any, string>

Implementation of

ICamera.uiConfig

Defined in

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


assetType

assetType: "model"

Implementation of

ICamera.assetType

Defined in

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


uuid

Readonly uuid: string

Implementation of

ICamera.uuid

Defined in

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

Constructors

constructor

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

Parameters

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

Overrides

SimpleEventDispatcher<'update'\>.constructor

Defined in

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