Skip to main content

Class: CameraViewPlugin

Plugins.CameraViewPlugin

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

Hierarchy

  • AViewerPlugin<"viewChange" | "startViewChange">

    CameraViewPlugin

Properties

PluginType

Static Readonly PluginType: "CameraViews"

Defined in

webgi/src/plugins/CameraViewPlugin.ts:75


enabled

enabled: boolean = true

Overrides

AViewerPlugin.enabled

Defined in

webgi/src/plugins/CameraViewPlugin.ts:77


viewLooping

viewLooping: boolean = false

Defined in

webgi/src/plugins/CameraViewPlugin.ts:104


viewPauseTime

viewPauseTime: number = 200

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

Defined in

webgi/src/plugins/CameraViewPlugin.ts:108


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:113


animDuration

animDuration: number = 1000

Defined in

webgi/src/plugins/CameraViewPlugin.ts:114


rotationOffset

rotationOffset: number = 0.25

Defined in

webgi/src/plugins/CameraViewPlugin.ts:115


interpolateMode

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

Defined in

webgi/src/plugins/CameraViewPlugin.ts:117


animateOnScroll

animateOnScroll: boolean = false

Defined in

webgi/src/plugins/CameraViewPlugin.ts:120


seekOnScroll

seekOnScroll: boolean = false

Defined in

webgi/src/plugins/CameraViewPlugin.ts:123


dependencies

dependencies: never[] = []

Defined in

webgi/src/plugins/CameraViewPlugin.ts:127


scrollAnimationDamping

scrollAnimationDamping: number = 0.1

Defined in

webgi/src/plugins/CameraViewPlugin.ts:130


uiConfig

uiConfig: UiObjectConfig<any, string>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:537


_dirty

Protected _dirty: boolean = false

Inherited from

AViewerPlugin._dirty

Defined in

webgi/src/core/AViewerPlugin.ts:25


_viewer

Protected Optional _viewer: ViewerApp

Inherited from

AViewerPlugin._viewer

Defined in

webgi/src/core/AViewerPlugin.ts:29

Accessors

dirty

get dirty(): boolean

Returns

boolean

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:18

set dirty(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:22


animationLooping

get animationLooping(): boolean

Returns

boolean

Defined in

webgi/src/plugins/CameraViewPlugin.ts:69


animating

get animating(): boolean

Returns

boolean

Defined in

webgi/src/plugins/CameraViewPlugin.ts:72


camViews

get camViews(): CameraView[]

Returns

CameraView[]

Defined in

webgi/src/plugins/CameraViewPlugin.ts:96

Methods

onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onDispose

Defined in

webgi/src/core/AViewerPlugin.ts:38


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Inherited from

AViewerPlugin.toJSON

Defined in

webgi/src/core/AViewerPlugin.ts:47


addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
type"serialize" | "deserialize" | "viewChange" | "startViewChange"
listener(event: IEvent<"serialize" | "deserialize" | "viewChange" | "startViewChange">) => void

Returns

void

Inherited from

AViewerPlugin.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:48


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameType
type"serialize" | "deserialize" | "viewChange" | "startViewChange"
listener(event: IEvent<"serialize" | "deserialize" | "viewChange" | "startViewChange">) => void

Returns

boolean

Inherited from

AViewerPlugin.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:56


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameType
type"serialize" | "deserialize" | "viewChange" | "startViewChange"
listener(event: IEvent<"serialize" | "deserialize" | "viewChange" | "startViewChange">) => void

Returns

void

Inherited from

AViewerPlugin.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<"serialize" | "deserialize" | "viewChange" | "startViewChange">

Returns

void

Inherited from

AViewerPlugin.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74


onAdded

onAdded(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onAdded

Defined in

webgi/src/plugins/CameraViewPlugin.ts:171


onRemove

onRemove(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onRemove

Defined in

webgi/src/plugins/CameraViewPlugin.ts:262


animateAllViews

animateAllViews(): Promise<void>

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:290


resetToFirstView

resetToFirstView(duration?): Promise<void>

Parameters

NameTypeDefault value
durationnumber100

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:301


recordAllViews

recordAllViews(onStart?): Promise<void>

Parameters

NameType
onStart?() => void

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:309


addCurrentView

addCurrentView(): Promise<void>

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:341


getCurrentCameraView

getCurrentCameraView(camera?): CameraView

Parameters

NameType
camera?CameraController

Returns

CameraView

Defined in

webgi/src/plugins/CameraViewPlugin.ts:355


focusView

focusView(view): Promise<void>

Parameters

NameType
viewCameraView

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:383


deleteView

deleteView(view): void

Parameters

NameType
viewCameraView

Returns

void

Defined in

webgi/src/plugins/CameraViewPlugin.ts:387


focusNext

focusNext(wrap?): void

Parameters

NameTypeDefault value
wrapbooleantrue

Returns

void

Defined in

webgi/src/plugins/CameraViewPlugin.ts:395


focusPrevious

focusPrevious(wrap?): void

Parameters

NameTypeDefault value
wrapbooleantrue

Returns

void

Defined in

webgi/src/plugins/CameraViewPlugin.ts:406


stopAllAnimations

stopAllAnimations(): Promise<void>

Returns

Promise<void>

Defined in

webgi/src/plugins/CameraViewPlugin.ts:418


animateToView

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

Parameters

NameType
viewCameraView
duration?number
easing?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:427


fromJSON

fromJSON(data, meta?): null | CameraViewPlugin

Parameters

NameType
dataany
meta?any

Returns

null | CameraViewPlugin

Overrides

AViewerPlugin.fromJSON

Defined in

webgi/src/plugins/CameraViewPlugin.ts:509


animateToObject

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

Parameters

NameTypeDefault value
selected?Object3D<Event>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:520


animateToTarget

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

Parameters

NameType
distanceFromTargetnumber
centerVector3
duration?number
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:529

Constructors

constructor

new CameraViewPlugin()

Overrides

AViewerPlugin.constructor

Defined in

webgi/src/plugins/CameraViewPlugin.ts:83