Class: CameraController
Core-API.CameraController
Hierarchy
SimpleEventDispatcher
<"update"
>↳
CameraController
Implements
ICamera
<IPerspectiveCameraOptions
|IOrthographicCameraOptions
,PerspectiveCamera
|OrthographicCamera
,TCameraControls
>
Accessors
controls
• get
controls(): undefined
| TCameraControls
Returns
undefined
| TCameraControls
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:39
userData
• get
userData(): any
Returns
any
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:52
• set
userData(value
): void
Parameters
Name | Type |
---|---|
value | any |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:55
isActiveCamera
• get
isActiveCamera(): boolean
Returns
boolean
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:59
target
• get
target(): Vector3
Returns
Vector3
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:63
• set
target(target
): void
Parameters
Name | Type |
---|---|
target | Vector3 |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:67
position
• get
position(): Vector3
Returns
Vector3
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:73
• set
position(position
): void
Parameters
Name | Type |
---|---|
position | Vector3 |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:76
name
• get
name(): string
Returns
string
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:82
• set
name(name
): void
Parameters
Name | Type |
---|---|
name | string |
Returns
void
Implementation of
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
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
Name | Type |
---|---|
value | boolean |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:204
cameraObject
• get
cameraObject(): OrthographicCamera
| PerspectiveCamera
Returns
OrthographicCamera
| PerspectiveCamera
Implementation of
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
Defined in
webgi/src/core/threejs/CameraController.ts:463
visible
• get
visible(): boolean
Returns
boolean
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:654
• set
visible(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:657
Methods
getControls
▸ getControls<T
>(): undefined
| T
Type parameters
Name | Type |
---|---|
T | extends ICameraControls <string , T > |
Returns
undefined
| T
Defined in
webgi/src/core/threejs/CameraController.ts:42
getCameraOptions
▸ getCameraOptions(): IPerspectiveCameraOptions
| IOrthographicCameraOptions
Returns
IPerspectiveCameraOptions
| IOrthographicCameraOptions
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:89
setCameraOptions
▸ setCameraOptions<T
>(value
, setDirty?
): void
Type parameters
Name | Type |
---|---|
T | extends Partial <IPerspectiveCameraOptions | IOrthographicCameraOptions > |
Parameters
Name | Type | Default value |
---|---|---|
value | T | undefined |
setDirty | boolean | true |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:97
setInteractions
▸ setInteractions(enabled
, by
): void
Parameters
Name | Type |
---|---|
enabled | boolean |
by | string |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:211
refreshAspect
▸ refreshAspect(setDirty?
): void
Parameters
Name | Type | Default value |
---|---|---|
setDirty | boolean | true |
Returns
void
Defined in
webgi/src/core/threejs/CameraController.ts:323
refreshTarget
▸ refreshTarget(distanceFromTarget?
): void
Parameters
Name | Type | Default value |
---|---|---|
distanceFromTarget | number | 4 |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:328
setControlsCtor
▸ setControlsCtor(key
, ctor
, replace?
): void
Parameters
Name | Type | Default value |
---|---|---|
key | string | undefined |
ctor | TControlsCtor | undefined |
replace | boolean | false |
Returns
void
Defined in
webgi/src/core/threejs/CameraController.ts:351
removeControlsCtor
▸ removeControlsCtor(key
): void
Parameters
Name | Type |
---|---|
key | string |
Returns
void
Defined in
webgi/src/core/threejs/CameraController.ts:358
refreshCameraControls
▸ refreshCameraControls(setDirty?
): void
Parameters
Name | Type | Default value |
---|---|---|
setDirty | boolean | true |
Returns
void
Defined in
webgi/src/core/threejs/CameraController.ts:386
setDirty
▸ setDirty(options?
): void
Parameters
Name | Type |
---|---|
options? | AnyOptions |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:414
activateMain
▸ activateMain(refresh?
): void
Parameters
Name | Type | Default value |
---|---|---|
refresh | boolean | true |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:434
deactivateMain
▸ deactivateMain(refresh?
): void
Parameters
Name | Type | Default value |
---|---|---|
refresh | boolean | true |
Returns
void
Implementation of
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
Name | Type | Default value |
---|---|---|
setDirty | boolean | true |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:563
positionUpdated
▸ positionUpdated(setDirty?
): void
Parameters
Name | Type | Default value |
---|---|---|
setDirty | boolean | true |
Returns
void
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:579
positionTargetUpdated
▸ positionTargetUpdated(setDirty?
): void
deprecated
- use positionUpdated instead
Parameters
Name | Type | Default value |
---|---|---|
setDirty | boolean | true |
Returns
void
Defined in
webgi/src/core/threejs/CameraController.ts:589
copyFromCamera
▸ copyFromCamera(camera
, distanceFromTarget?
): void
Parameters
Name | Type | Default value |
---|---|---|
camera | OrthographicCamera | PerspectiveCamera | undefined |
distanceFromTarget | number | 4 |
Returns
void
Defined in
webgi/src/core/threejs/CameraController.ts:593
updateShaderProperties
▸ updateShaderProperties(material
): CameraController
Parameters
Name | Type |
---|---|
material | Object |
material.defines | Record <string , undefined | string | number > |
material.uniforms | Object |
Returns
Implementation of
ICamera.updateShaderProperties
Defined in
webgi/src/core/threejs/CameraController.ts:606
toJSON
▸ toJSON(meta?
): any
Parameters
Name | Type |
---|---|
meta? | any |
Returns
any
Implementation of
ICamera.toJSON
Defined in
webgi/src/core/threejs/CameraController.ts:615
fromJSON
▸ fromJSON(data
, meta?
): null
| CameraController
Parameters
Name | Type |
---|---|
data | any |
meta? | any |
Returns
null
| CameraController
Implementation of
ICamera.fromJSON
Defined in
webgi/src/core/threejs/CameraController.ts:623
refreshCameraOptions
▸ refreshCameraOptions(setDirty?
): void
Parameters
Name | Type | Default value |
---|---|---|
setDirty | boolean | true |
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
Defined in
webgi/src/core/threejs/CameraController.ts:230
far
• far: number
= 50
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:235
uiConfig
• uiConfig: UiObjectConfig
<any
, string
>
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:533
assetType
• assetType: "model"
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:556
uuid
• Readonly
uuid: string
Implementation of
Defined in
webgi/src/core/threejs/CameraController.ts:652
Constructors
constructor
• new CameraController(camera?
, options?
, domElement?
)
Parameters
Name | Type |
---|---|
camera? | OrthographicCamera | PerspectiveCamera |
options? | Partial <IPerspectiveCameraOptions | IOrthographicCameraOptions > |
domElement? | HTMLElement |
Overrides
SimpleEventDispatcher<'update'\>.constructor