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"
enabled
• enabled: boolean = true
Overrides
viewLooping
• viewLooping: boolean = false
viewPauseTime
• viewPauseTime: number = 200
Pauses time between view changes when animating all views or looping.
animEase
• animEase: "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | "bounceOut" | "bounceIn" | "bounceInOut" | "easeInOutSine" = 'easeInOutSine'
animDuration
• animDuration: number = 1000
rotationOffset
• rotationOffset: number = 0.25
interpolateMode
• interpolateMode: "linear" | "spherical" | "spline" = 'spherical'
splineCurve
• splineCurve: "centripetal" | "chordal" | "catmullrom" = 'chordal'
animateOnScroll
• animateOnScroll: boolean = false
seekOnScroll
• seekOnScroll: boolean = false
dependencies
• dependencies: never[] = []
scrollAnimationDamping
• scrollAnimationDamping: number = 0.1
uiConfig
• uiConfig: UiObjectConfig<any, string>
_dirty
• Protected _dirty: boolean = false
Inherited from
_viewer
• Protected Optional _viewer: ViewerApp
Inherited from
Accessors
dirty
• get dirty(): boolean
Returns
boolean
Inherited from
AViewerPlugin.dirty
• set dirty(value): void
Parameters
| Name | Type |
|---|---|
value | boolean |
Returns
void
Inherited from
AViewerPlugin.dirty
viewer
• get viewer(): undefined | ViewerApp
Returns
undefined | ViewerApp
Inherited from
AViewerPlugin.viewer
animationLooping
• get animationLooping(): boolean
Returns
boolean
animating
• get animating(): boolean
Returns
boolean
camViews
• get camViews(): CameraView[]
Returns
Methods
onDispose
▸ onDispose(viewer): Promise<void>
Parameters
| Name | Type |
|---|---|
viewer | ViewerApp |
Returns
Promise<void>
Inherited from
toJSON
▸ toJSON(meta?): any
Parameters
| Name | Type |
|---|---|
meta? | any |
Returns
any
Inherited from
exportState
▸ exportState(): any
Returns
any
Inherited from
importState
▸ importState(state): Promise<void>
Parameters
| Name | Type |
|---|---|
state | any |
Returns
Promise<void>
Inherited from
storeState
▸ storeState(prefix?, storage?, data?): void
Parameters
| Name | Type |
|---|---|
prefix? | string |
storage? | Storage |
data? | any |
Returns
void
Inherited from
loadState
▸ loadState(prefix?, storage?): Promise<void>
Parameters
| Name | Type |
|---|---|
prefix? | string |
storage? | Storage |
Returns
Promise<void>
Inherited from
onAdded
▸ onAdded(viewer): Promise<void>
Parameters
| Name | Type |
|---|---|
viewer | ViewerApp |
Returns
Promise<void>
Overrides
onRemove
▸ onRemove(viewer): Promise<void>
Parameters
| Name | Type |
|---|---|
viewer | ViewerApp |
Returns
Promise<void>
Overrides
animateAllViews
▸ animateAllViews(): Promise<void>
Returns
Promise<void>
resetToFirstView
▸ resetToFirstView(duration?): Promise<void>
Parameters
| Name | Type | Default value |
|---|---|---|
duration | number | 100 |
Returns
Promise<void>
recordAllViews
▸ recordAllViews(onStart?, downloadOnEnd?): Promise<undefined | Blob>
Parameters
| Name | Type | Default value |
|---|---|---|
onStart? | () => void | undefined |
downloadOnEnd | boolean | true |
Returns
Promise<undefined | Blob>
addCurrentView
▸ addCurrentView(): Promise<void>
Returns
Promise<void>
addView
▸ addView(view): void
Parameters
| Name | Type |
|---|---|
view | CameraView |
Returns
void
getCurrentCameraView
▸ getCurrentCameraView(camera?, worldSpace?, view?): CameraView
Parameters
| Name | Type | Default value |
|---|---|---|
camera? | CameraController<CameraControllerEventMap> | undefined |
worldSpace | boolean | true |
view? | CameraView | undefined |
Returns
setCurrentCameraView
▸ setCurrentCameraView(view): void
Parameters
| Name | Type |
|---|---|
view | CameraView |
Returns
void
focusView
▸ focusView(view): Promise<void>
Parameters
| Name | Type |
|---|---|
view | CameraView |
Returns
Promise<void>
deleteView
▸ deleteView(view): void
Parameters
| Name | Type |
|---|---|
view | CameraView |
Returns
void
focusNext
▸ focusNext(wrap?): void
Parameters
| Name | Type | Default value |
|---|---|---|
wrap | boolean | true |
Returns
void
focusPrevious
▸ focusPrevious(wrap?): void
Parameters
| Name | Type | Default value |
|---|---|---|
wrap | boolean | true |
Returns
void
stopAllAnimations
▸ stopAllAnimations(): Promise<void>
Returns
Promise<void>
animateToView
▸ animateToView(view, duration?, easing?, throwOnStop?): Promise<void>
Parameters
| Name | Type | Default value |
|---|---|---|
view | CameraView | undefined |
duration? | number | undefined |
easing? | Easing | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | "bounceOut" | "bounceIn" | "bounceInOut" | "easeInOutSine" | undefined |
throwOnStop | boolean | false |
Returns
Promise<void>
fromJSON
▸ fromJSON(data, meta?): null | CameraViewPlugin
Parameters
| Name | Type |
|---|---|
data | any |
meta? | any |
Returns
null | CameraViewPlugin
Overrides
animateToObject
▸ animateToObject(selected?, distanceMultiplier?, duration?, ease?, distanceBounds?): Promise<void>
Parameters
| Name | Type | Default value |
|---|---|---|
selected? | Object3D<Object3DEventMap> | undefined |
distanceMultiplier | number | 4 |
duration? | number | undefined |
ease? | Easing | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | "bounceOut" | "bounceIn" | "bounceInOut" | "easeInOutSine" | undefined |
distanceBounds | Object | undefined |
distanceBounds.min | number | 0.5 |
distanceBounds.max | number | 5.0 |
Returns
Promise<void>
animateToFitObject
▸ animateToFitObject(selected?, distanceMultiplier?, duration?, ease?, distanceBounds?): Promise<void>
Parameters
| Name | Type | Default value |
|---|---|---|
selected? | Object3D<Object3DEventMap> | undefined |
distanceMultiplier | number | 1.5 |
duration | number | 1000 |
ease? | Easing | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | "bounceOut" | "bounceIn" | "bounceInOut" | "easeInOutSine" | undefined |
distanceBounds | Object | undefined |
distanceBounds.min | number | 0.5 |
distanceBounds.max | number | 50.0 |
Returns
Promise<void>
animateToTarget
▸ animateToTarget(distanceFromTarget, center, duration?, ease?): Promise<void>
Parameters
| Name | Type | Description |
|---|---|---|
distanceFromTarget | number | in world units |
center | Vector3 | target (center) of the view in world coordinates |
duration? | number | in milliseconds |
ease? | Easing | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | "bounceOut" | "bounceIn" | "bounceInOut" | "easeInOutSine" |
Returns
Promise<void>
_storeKey
▸ Protected _storeKey(prefix?): string
Parameters
| Name | Type |
|---|---|
prefix? | string |
Returns
string
Inherited from
Constructors
constructor
• new CameraViewPlugin()