SimpleCamera
A basic camera that uses yomotsu's cameracontrols to control the camera in 2D and 3D. Check out it's API to find out what features it offers.
Extends
Extended by
Implements
Properties
onAfterUpdate
readonlyonAfterUpdate:Event<SimpleCamera>
Implementation of
onAspectUpdated
readonlyonAspectUpdated:Event<unknown>
Event that is triggered when the aspect of the camera has been updated. This event is useful when you need to perform actions after the aspect of the camera has been changed.
onBeforeUpdate
readonlyonBeforeUpdate:Event<SimpleCamera>
Implementation of
onDisposed
readonlyonDisposed:Event<string>
Implementation of
onWorldChanged
readonlyonWorldChanged:Event<object>
Event that is triggered when a world is added or removed from the worlds map.
The event payload contains the world instance and the action ("added" or "removed").
Type declaration
action
action:
"added"|"removed"
world
world:
World
Inherited from
three
three:
PerspectiveCamera|OrthographicCamera
A three.js PerspectiveCamera or OrthographicCamera instance. This camera is used for rendering the scene.
Overrides
Accessors
controls
getcontrols():CameraControls
The object that controls the camera. An instance of yomotsu's cameracontrols. Transforming the camera directly will have no effect: you need to use this object to move, rotate, look at objects, etc.
Returns
CameraControls
enabled
getenabled():boolean
Getter for the enabled state of the camera controls. If the current world is null, it returns false. Otherwise, it returns the enabled state of the camera controls.
setenabled(enabled):void
Setter for the enabled state of the camera controls. If the current world is not null, it sets the enabled state of the camera controls to the provided value.
Parameters
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | The new enabled state of the camera controls. |
Returns
boolean
The enabled state of the camera controls.
Methods
dispose()
dispose():
void
Returns
void
Implementation of
hasCameraControls()
hasCameraControls():
this is CameraControllable
Checks whether the instance is CameraControllable.
Returns
this is CameraControllable
True if the instance is controllable, false otherwise.
Inherited from
BaseCamera . hasCameraControls
isConfigurable()
isConfigurable():
this is Configurable<any, any>
Whether is component is Configurable.
Returns
this is Configurable<any, any>
Inherited from
isDisposeable()
isDisposeable():
this is Disposable
Whether is component is Disposable.
Returns
this is Disposable
Inherited from
isHideable()
isHideable():
this is Hideable
Whether is component is Hideable.
Returns
this is Hideable
Inherited from
isResizeable()
isResizeable():
this is Resizeable
Whether is component is Resizeable.
Returns
this is Resizeable
Inherited from
isUpdateable()
isUpdateable():
this is Updateable
Whether is component is Updateable.
Returns
this is Updateable
Inherited from
update()
update(
_delta):void
Parameters
| Parameter | Type |
|---|---|
_delta | number |
Returns
void
Implementation of
updateAspect()
updateAspect():
void
Updates the aspect of the camera to match the size of the Components.renderer.
Returns
void