Skip to main content

Class: CameraViewPlugin

Plugins.CameraViewPlugin

Plugin to save, interact and animate between with multiple camera states/views.

Hierarchy

  • AViewerPlugin<"viewChange" | "startViewChange" | "viewAdd" | "viewDelete">

    CameraViewPlugin

Properties

PluginType

Static Readonly PluginType: "CameraViews"

Defined in

webgi/src/plugins/CameraViewPlugin.ts:77


enabled

enabled: boolean = true

Overrides

AViewerPlugin.enabled

Defined in

webgi/src/plugins/CameraViewPlugin.ts:79


viewLooping

viewLooping: boolean = false

Defined in

webgi/src/plugins/CameraViewPlugin.ts:106


viewPauseTime

viewPauseTime: number = 200

Pauses time between view changes when animating all views or looping.

Defined in

webgi/src/plugins/CameraViewPlugin.ts:110


animEase

animEase: "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | "bounceOut" | "bounceIn" | "bounceInOut" | "easeInOutSine" = 'easeInOutSine'

EasingFunctions

Defined in

webgi/src/plugins/CameraViewPlugin.ts:115


animDuration

animDuration: number = 1000

Defined in

webgi/src/plugins/CameraViewPlugin.ts:116


rotationOffset

rotationOffset: number = 0.25

Defined in

webgi/src/plugins/CameraViewPlugin.ts:117


interpolateMode

interpolateMode: "linear" | "spherical" = 'spherical'

Defined in

webgi/src/plugins/CameraViewPlugin.ts:119


animateOnScroll

animateOnScroll: boolean = false

Defined in

webgi/src/plugins/CameraViewPlugin.ts:122


seekOnScroll

seekOnScroll: boolean = false

Defined in

webgi/src/plugins/CameraViewPlugin.ts:125


dependencies

dependencies: never[] = []

Defined in

webgi/src/plugins/CameraViewPlugin.ts:129


scrollAnimationDamping

scrollAnimationDamping: number = 0.1

Defined in

webgi/src/plugins/CameraViewPlugin.ts:132


uiConfig

uiConfig: UiObjectConfig<any, string>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:637


_dirty

Protected _dirty: boolean = false

Inherited from

AViewerPlugin._dirty

Defined in

webgi/src/core/AViewerPlugin.ts:23


_viewer

Protected Optional _viewer: ViewerApp

Inherited from

AViewerPlugin._viewer

Defined in

webgi/src/core/AViewerPlugin.ts:27

Accessors

dirty

get dirty(): boolean

Returns

boolean

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:16

set dirty(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:20


animationLooping

get animationLooping(): boolean

Returns

boolean

Defined in

webgi/src/plugins/CameraViewPlugin.ts:71


animating

get animating(): boolean

Returns

boolean

Defined in

webgi/src/plugins/CameraViewPlugin.ts:74


camViews

get camViews(): CameraView[]

Returns

CameraView[]

Defined in

webgi/src/plugins/CameraViewPlugin.ts:98

Methods

onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onDispose

Defined in

webgi/src/core/AViewerPlugin.ts:36


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Inherited from

AViewerPlugin.toJSON

Defined in

webgi/src/core/AViewerPlugin.ts:45


exportState

exportState(): any

Returns

any

Inherited from

AViewerPlugin.exportState

Defined in

webgi/src/core/AViewerPlugin.ts:64


importState

importState(state): Promise<void>

Parameters

NameType
stateany

Returns

Promise<void>

Inherited from

AViewerPlugin.importState

Defined in

webgi/src/core/AViewerPlugin.ts:67


storeState

storeState(prefix?, storage?, data?): void

Parameters

NameType
prefix?string
storage?Storage
data?any

Returns

void

Inherited from

AViewerPlugin.storeState

Defined in

webgi/src/core/AViewerPlugin.ts:74


loadState

loadState(prefix?, storage?): Promise<void>

Parameters

NameType
prefix?string
storage?Storage

Returns

Promise<void>

Inherited from

AViewerPlugin.loadState

Defined in

webgi/src/core/AViewerPlugin.ts:84


onAdded

onAdded(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onAdded

Defined in

webgi/src/plugins/CameraViewPlugin.ts:173


onRemove

onRemove(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onRemove

Defined in

webgi/src/plugins/CameraViewPlugin.ts:264


animateAllViews

animateAllViews(): Promise<void>

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:292


resetToFirstView

resetToFirstView(duration?): Promise<void>

Parameters

NameTypeDefault value
durationnumber100

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:303


recordAllViews

recordAllViews(onStart?, downloadOnEnd?): Promise<undefined | Blob>

Parameters

NameTypeDefault value
onStart?() => voidundefined
downloadOnEndbooleantrue

Returns

Promise<undefined | Blob>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:311


addCurrentView

addCurrentView(): Promise<void>

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:353


addView

addView(view): void

Parameters

NameType
viewCameraView

Returns

void

Defined in

webgi/src/plugins/CameraViewPlugin.ts:364


getCurrentCameraView

getCurrentCameraView(camera?, worldSpace?, view?): CameraView

Parameters

NameTypeDefault value
camera?CameraControllerundefined
worldSpacebooleantrue
view?CameraViewundefined

Returns

CameraView

Defined in

webgi/src/plugins/CameraViewPlugin.ts:370


setCurrentCameraView

setCurrentCameraView(view): void

Parameters

NameType
viewCameraView

Returns

void

Defined in

webgi/src/plugins/CameraViewPlugin.ts:418


focusView

focusView(view): Promise<void>

Parameters

NameType
viewCameraView

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:437


deleteView

deleteView(view): void

Parameters

NameType
viewCameraView

Returns

void

Defined in

webgi/src/plugins/CameraViewPlugin.ts:441


focusNext

focusNext(wrap?): void

Parameters

NameTypeDefault value
wrapbooleantrue

Returns

void

Defined in

webgi/src/plugins/CameraViewPlugin.ts:450


focusPrevious

focusPrevious(wrap?): void

Parameters

NameTypeDefault value
wrapbooleantrue

Returns

void

Defined in

webgi/src/plugins/CameraViewPlugin.ts:461


stopAllAnimations

stopAllAnimations(): Promise<void>

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:473


animateToView

animateToView(view, duration?, easing?, throwOnStop?): Promise<void>

Parameters

NameTypeDefault value
viewCameraViewundefined
duration?numberundefined
easing?Easing | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | "bounceOut" | "bounceIn" | "bounceInOut" | "easeInOutSine"undefined
throwOnStopbooleanfalse

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:482


fromJSON

fromJSON(data, meta?): null | CameraViewPlugin

Parameters

NameType
dataany
meta?any

Returns

null | CameraViewPlugin

Overrides

AViewerPlugin.fromJSON

Defined in

webgi/src/plugins/CameraViewPlugin.ts:577


animateToObject

animateToObject(selected?, distanceMultiplier?, duration?, ease?, distanceBounds?): Promise<void>

Parameters

NameTypeDefault value
selected?Object3D<Event, string>undefined
distanceMultipliernumber4
duration?numberundefined
ease?Easing | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | "bounceOut" | "bounceIn" | "bounceInOut" | "easeInOutSine"undefined
distanceBoundsObjectundefined
distanceBounds.minnumber0.5
distanceBounds.maxnumber5.0

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:589


animateToFitObject

animateToFitObject(selected?, distanceMultiplier?, duration?, ease?, distanceBounds?): Promise<void>

Parameters

NameTypeDefault value
selected?Object3D<Event, string>undefined
distanceMultipliernumber1.5
durationnumber1000
ease?Easing | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | "bounceOut" | "bounceIn" | "bounceInOut" | "easeInOutSine"undefined
distanceBoundsObjectundefined
distanceBounds.minnumber0.5
distanceBounds.maxnumber50.0

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:598


animateToTarget

animateToTarget(distanceFromTarget, center, duration?, ease?): Promise<void>

Parameters

NameTypeDescription
distanceFromTargetnumberin world units
centerVector3target (center) of the view in world coordinates
duration?numberin milliseconds
ease?Easing | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | "bounceOut" | "bounceIn" | "bounceInOut" | "easeInOutSine"

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:629


_storeKey

Protected _storeKey(prefix?): string

Parameters

NameType
prefix?string

Returns

string

Inherited from

AViewerPlugin._storeKey

Defined in

webgi/src/core/AViewerPlugin.ts:60

Constructors

constructor

new CameraViewPlugin()

Overrides

AViewerPlugin.constructor

Defined in

webgi/src/plugins/CameraViewPlugin.ts:85