Skip to main content

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

Implements

Properties

activeCamera

activeCamera: PerspectiveCamera | OrthographicCamera

The camera that is being used now according to the current CameraProjection.

Inherited from

SimpleCamera.activeCamera

Defined in

temp/components/core/SimpleCamera/index.ts:46


afterUpdate

Readonly afterUpdate: Event<SimpleCamera>

afterUpdate

Inherited from

SimpleCamera.afterUpdate

Defined in

temp/components/core/SimpleCamera/index.ts:23


beforeUpdate

Readonly beforeUpdate: Event<SimpleCamera>

beforeUpdate

Inherited from

SimpleCamera.beforeUpdate

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

SimpleCamera.controls

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"

name

Inherited from

SimpleCamera.name

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

enabled

Returns

boolean

Inherited from

SimpleCamera.enabled

Defined in

temp/components/core/SimpleCamera/index.ts:34

set enabled(enabled): void

enabled

Parameters

NameType
enabledboolean

Returns

void

Inherited from

SimpleCamera.enabled

Defined in

temp/components/core/SimpleCamera/index.ts:39

Methods

dispose

dispose(): void

dispose

Returns

void

Overrides

SimpleCamera.dispose

Defined in

temp/components/navigation/OrthoPerspectiveCamera/index.ts:87


fitModelToFrame

fitModelToFrame(meshes?): Promise<void>

Make the camera view fit all the specified meshes.

Parameters

NameTypeDescription
meshesMesh<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

NameTypeDescription
projection?CameraProjectionThe camera corresponding to the CameraProjection specified. If no projection is specified, the active camera will be returned.

Returns

PerspectiveCamera | OrthographicCamera

Overrides

SimpleCamera.get

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

SimpleCamera.hasUI

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

SimpleCamera.isDisposeable

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

SimpleCamera.isHideable

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

SimpleCamera.isResizeable

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

SimpleCamera.isUpdateable

Defined in

temp/components/base-types/component.ts:38


setNavigationMode

setNavigationMode(mode): void

Sets a new NavigationMode and disables the previous one.

Parameters

NameTypeDescription
modeNavModeIDThe 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

NameTypeDescription
projectionCameraProjectionThe 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

NameTypeDescription
activebooleanwhether to enable or disable user inputs.

Returns

void

Defined in

temp/components/navigation/OrthoPerspectiveCamera/index.ts:142


update

update(_delta): void

update

Parameters

NameType
_deltanumber

Returns

void

Inherited from

SimpleCamera.update

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

SimpleCamera.updateAspect

Defined in

temp/components/navigation/OrthoPerspectiveCamera/index.ts:166