Class: OrthoPerspectiveCamera
components.OrthoPerspectiveCamera
A flexible camera that uses yomotsu's cameracontrols to easily control the camera in 2D and 3D. It supports multiple navigation modes, such as 2D floor plan navigation, first person and 3D orbit.
Hierarchy
↳
OrthoPerspectiveCamera
Implements
Properties
activeCamera
• activeCamera: PerspectiveCamera
| OrthographicCamera
The camera that is being used now according to the current CameraProjection.
Inherited from
Defined in
temp/components/core/SimpleCamera/index.ts:46
afterUpdate
• Readonly
afterUpdate: Event
<SimpleCamera
>
Inherited from
Defined in
temp/components/core/SimpleCamera/index.ts:23
beforeUpdate
• Readonly
beforeUpdate: Event
<SimpleCamera
>
Inherited from
Defined in
temp/components/core/SimpleCamera/index.ts:20
controls
• Readonly
controls: 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.
Inherited from
Defined in
temp/components/core/SimpleCamera/index.ts:31
currentMode
• currentMode: NavigationMode
The current NavigationMode.
Defined in
temp/components/navigation/OrthoPerspectiveCamera/index.ts:21
name
• name: string
= "SimpleCamera"
Inherited from
Defined in
temp/components/core/SimpleCamera/index.ts:17
projectionChanged
• Readonly
projectionChanged: Event
<Camera
>
Event that fires when the CameraProjection changes.
Defined in
temp/components/navigation/OrthoPerspectiveCamera/index.ts:26
Accessors
enabled
• get
enabled(): boolean
Returns
boolean
Inherited from
SimpleCamera.enabled
Defined in
temp/components/core/SimpleCamera/index.ts:34
• set
enabled(enabled
): void
Parameters
Name | Type |
---|---|
enabled | boolean |
Returns
void
Inherited from
SimpleCamera.enabled
Defined in
temp/components/core/SimpleCamera/index.ts:39
Methods
dispose
▸ dispose(): void
Returns
void
Overrides
Defined in
temp/components/navigation/OrthoPerspectiveCamera/index.ts:87
fitModelToFrame
▸ fitModelToFrame(meshes?
): Promise
<void
>
Make the camera view fit all the specified meshes.
Parameters
Name | Type | Description |
---|---|---|
meshes | Mesh <BufferGeometry <NormalBufferAttributes >, Material | Material []>[] | the meshes to fit. If it is not defined, it will evaluate meshes. |
Returns
Promise
<void
>
Defined in
temp/components/navigation/OrthoPerspectiveCamera/index.ts:177
get
▸ get(projection?
): PerspectiveCamera
| OrthographicCamera
Similar to get, but with an optional argument to specify which camera to get.
Parameters
Name | Type | Description |
---|---|---|
projection? | CameraProjection | The camera corresponding to the CameraProjection specified. If no projection is specified, the active camera will be returned. |
Returns
PerspectiveCamera
| OrthographicCamera
Overrides
Defined in
temp/components/navigation/OrthoPerspectiveCamera/index.ts:101
getProjection
▸ getProjection(): CameraProjection
Returns the current CameraProjection.
Returns
CameraProjection
Defined in
temp/components/navigation/OrthoPerspectiveCamera/index.ts:111
hasUI
▸ hasUI(): this is UI
Whether is component implements any kind of UI.
Returns
this is UI
Inherited from
Defined in
temp/components/base-types/component.ts:48
isDisposeable
▸ isDisposeable(): this is Disposable
Whether is component is Disposable.
Returns
this is Disposable
Inherited from
Defined in
temp/components/base-types/component.ts:28
isHideable
▸ isHideable(): this is Hideable
Whether is component is Hideable.
Returns
this is Hideable
Inherited from
Defined in
temp/components/base-types/component.ts:43
isResizeable
▸ isResizeable(): this is Resizeable
Whether is component is Resizeable.
Returns
this is Resizeable
Inherited from
Defined in
temp/components/base-types/component.ts:33
isUpdateable
▸ isUpdateable(): this is Updateable
Whether is component is Updateable.
Returns
this is Updateable
Inherited from
Defined in
temp/components/base-types/component.ts:38
setNavigationMode
▸ setNavigationMode(mode
): void
Sets a new NavigationMode and disables the previous one.
Parameters
Name | Type | Description |
---|---|---|
mode | NavModeID | The NavigationMode to set. |
Returns
void
Defined in
temp/components/navigation/OrthoPerspectiveCamera/index.ts:155
setProjection
▸ setProjection(projection
): Promise
<void
>
Sets the current CameraProjection. This triggers the event projectionChanged.
Parameters
Name | Type | Description |
---|---|---|
projection | CameraProjection | The new CameraProjection to set. |
Returns
Promise
<void
>
Defined in
temp/components/navigation/OrthoPerspectiveCamera/index.ts:132
toggleProjection
▸ toggleProjection(): Promise
<void
>
Changes the current CameraProjection from Ortographic to Perspective and Viceversa.
Returns
Promise
<void
>
Defined in
temp/components/navigation/OrthoPerspectiveCamera/index.ts:119
toggleUserInput
▸ toggleUserInput(active
): void
Allows or prevents all user input.
Parameters
Name | Type | Description |
---|---|---|
active | boolean | whether to enable or disable user inputs. |
Returns
void
Defined in
temp/components/navigation/OrthoPerspectiveCamera/index.ts:142
update
▸ update(_delta
): void
Parameters
Name | Type |
---|---|
_delta | number |
Returns
void
Inherited from
Defined in
temp/components/core/SimpleCamera/index.ts:75
updateAspect
▸ updateAspect(): void
Updates the aspect ratio of the camera to match the Renderer's aspect ratio.
Returns
void
Overrides
Defined in
temp/components/navigation/OrthoPerspectiveCamera/index.ts:166